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

Allow inline executor to respect scheduled jobs; deprecate old behavior. Add GoodJob.perform_inline #615

Merged
merged 1 commit into from
Jun 17, 2022

Conversation

bensheldon
Copy link
Owner

@bensheldon bensheldon commented Jun 9, 2022

  • Deprecates the current behavior of inline execution immediately executing enqueued jobs, regardless of their scheduled time.
  • Implements opt-in future behavior of having inline execution respect job schedules at enqueue. This fixes several problems like Concurrency controlled jobs cause infinite loops when perform_limit is exceeded in test environments #609 and allows for more realistic integration testing.
  • Adds a new option config.good_job.inline_execution_respects_schedule to opt-into future behavior in the next major release; setting this also quiets the deprecation notice.
  • Adds a new public method GoodJob.perform_inline that will execute all eligible jobs in the current thread. Intended to be used for tests alongside the inline execution mode.

Connects to #609

@bensheldon bensheldon merged commit cc9909d into main Jun 17, 2022
@bensheldon bensheldon deleted the inline_scheduled branch June 17, 2022 01:22
@bensheldon bensheldon added the enhancement New feature or request label Jun 22, 2022
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.

1 participant