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

Use thread queue delivery method for Resque, when it's safe to do so #629

Merged
merged 3 commits into from
Aug 18, 2020

Conversation

imjoehaines
Copy link
Contributor

Goal

Our thread queue delivery relies on an at_exit hook to flush the queue before the thread exits. Unfortunately this doesn't work with Resque as it does not run on_exit hooks by default. There is a run_at_exit_hooks setting, which can be used to enable on_exit hooks and so we can safely use thread queue delivery when this is enabled

Related to #593

Changeset

  • Detect if run_at_exit_hooks is enabled and, if so, use thread queue delivery (otherwise stick with synchronous)
  • Updated the Resque Maze Runner test to enable run_at_exit_hooks

Testing

I've manually tested that delivery succeeds with thread queue delivery and on_exit hooks (and that it fails with on_exit hooks disabled) and there's a new Maze Runner test to ensure this doesn't regress

@imjoehaines imjoehaines changed the base branch from master to next August 17, 2020 08:14
@imjoehaines imjoehaines merged commit 11b26f4 into next Aug 18, 2020
@imjoehaines imjoehaines deleted the resque-delivery-method branch August 18, 2020 08:05
@imjoehaines imjoehaines mentioned this pull request Aug 27, 2020
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

Successfully merging this pull request may close these issues.

2 participants