Skip to content

Accept optional job argument in stopping?#747

Open
thoughtless wants to merge 1 commit into
rails:mainfrom
thoughtless:stopping-update
Open

Accept optional job argument in stopping?#747
thoughtless wants to merge 1 commit into
rails:mainfrom
thoughtless:stopping-update

Conversation

@thoughtless
Copy link
Copy Markdown

Rails commit 6d1c401dc7 ("Pass job instance to stopping?") changed ActiveJob::Continuable#checkpoint! to call queue_adapter.stopping?(self), passing the running job so adapters can decide whether to checkpoint based on it.

This caused errors such as:

ArgumentError: wrong number of arguments (given 1, expected 0)

The new argument is ignored. Solid Queue still relies solely on the worker shutdown flag. But the signature is now compatible with both the new and old Rails calling conventions.

Rails commit 6d1c401dc7 ("Pass job instance to stopping?") changed
ActiveJob::Continuable#checkpoint! to call queue_adapter.stopping?(self),
passing the running job so adapters can decide whether to checkpoint
based on it.

This caused errors such as:

    ArgumentError: wrong number of arguments (given 1, expected 0)

The new argument is ignored. Solid Queue still relies solely on the
worker shutdown flag. But the signature is now compatible with both
the new and old Rails calling conventions.
@thoughtless
Copy link
Copy Markdown
Author

As far as I can tell, the failing CI tests are flaky and not caused by this change.

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.

1 participant