Replies: 1 comment 2 replies
-
Wouldn't be simpler to just check if the active count is larger or equal than 2 and if so skip the processing of this job? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know if you do have multiple workers it's not possible to archive it, it is stated clearly in docs. But what if I will be checking for active jobs, and if there are more then one active jobs, I will be just skipping this execution run.
Does anybody see any race condition problem with it? as for me it should be fine
And if it's ok, it is worth adding it as a pattern to the docs?
and I didn't find easy way to get active jobs by id, nothing in docs, probably it's not possible, or possible with some custom redis request
Here is an example implementation for this:
and test:
Beta Was this translation helpful? Give feedback.
All reactions