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

Do not throw error when enqueueAllRecurrentTasks encounters the task already enqueued #1554

Merged
merged 2 commits into from
Aug 12, 2020

Conversation

evantahler
Copy link
Member

When calling task.enqueueAllRecurrentTasks() (which happens automatically at startup), there may be a race condition in which 2 instances of the recurring task are attempted to be enqueued at the same time. Before this PR, one of the tasks would throw an error, and possibly end up in the resque error queue. In reality, we only want one instance of each recurring task enqueued anyway, so we shouldn't throw... we now just log.

@evantahler evantahler added the enhancement New feature or request label Aug 12, 2020
@evantahler evantahler merged commit 3f9b02b into master Aug 12, 2020
@evantahler evantahler deleted the enqueueAllRecurrentTasks-duplicates branch August 12, 2020 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant