Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Jobs #72

Closed
mtodd opened this issue May 25, 2010 · 3 comments
Closed

Duplicate Jobs #72

mtodd opened this issue May 25, 2010 · 3 comments

Comments

@mtodd
Copy link

mtodd commented May 25, 2010

I noticed (or failed to) that there's no way to prevent duplicate jobs from being queued up. I was wondering whether this feature would be pulled in if I was to write it. Specifically, I would only be developing it for the ActiveRecord backend: I'm lazy and don't intend to act like I know the best way to implement it for the other backends.

I intend to make it a global setting like Delayed::Worker.max_run_time, but also allow local override. For instance:

Delayed::Worker.allow_duplicates = true
Delayed::Job.enqueue( RefreshTwitterFeedJob.new(username), :allow_duplicates => false )

The reasoning here would be that we normally would allow duplicates to be queued up, but that we won't want to queue up the same job if the same job is already queued and hasn't been started yet, since the end result would be the same (enough).

@bkeepers
Copy link

I'm not really interested in this feature. See this thread: http://groups.google.com/group/delayed_job/browse_thread/thread/c681cab0a4dae941

If someone wants to put together a patch with passing tests and rally support for it on the mailing list, then I would consider pulling it in.

@mtodd
Copy link
Author

mtodd commented May 27, 2010

Not exactly sure what you're trying to illuminate with the thread linked.

I'd be happy to put together the patch including tests. I'll post it to the mailing list once it's ready and see what kind of response it gets.

@bkeepers
Copy link

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants