Skip to content

Conversation

peret
Copy link

@peret peret commented Feb 27, 2017

Fixes #504 for recurring jobs. I'm not sure if the behavior should be the same for delayed jobs. Can be added easily, though.

Peter Retzlaff added 4 commits February 27, 2017 17:02
If overlap is set to false, we don't want to enqueue jobs if there's already one running or enqueued.
Add new method to get the queue_name and check if enqueuing is allowed.
end
return true if currently_processing

Resque.peek(queue_name, 0, 5000).any?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats this jazz about?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to figure out, if there's either a worker still working on the scheduled job or there's already one in the queue.
Granted, it's awkward. I updated the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants