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

Unblock rufus-scheduler upgrade by fixing shutdown #736

Merged
merged 2 commits into from
Mar 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Remove support for Ruby < 2.3
- Configuration to use a set of truthy values to enable boolean settings instead of simply existence
- Add `delay_or_enqueue_at` for delaying existing jobs or creating a new job
- Unblock rufus-scheduler lock on lower than 3.7 by fixing scheduler shutdown

## [4.5.0] - 2021-09-25
### Added
Expand Down
1 change: 0 additions & 1 deletion lib/resque/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ def handle_signals_with_operation

def stop_rufus_scheduler
rufus_scheduler.shutdown(:wait)
rufus_scheduler.join
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the CI tests, looks like the only version failing is 3.6.

I'd suggest something like:

rufus_scheduler.join if Gem.loaded_specs["rufus_scheduler"].version.to_s.starts_with?("3.6")

I'd guess this change would potentially fix the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fagiani ugh, looks like a flake, rebuilt and it passed. Ran it locally without failure. I don't believe that failure would even be related to this change though.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great @carsonreinke !

@iloveitaly when is the next release including this PR planned?

Keep Rocking!

end

def before_shutdown
Expand Down
2 changes: 1 addition & 1 deletion resque-scheduler.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'resque', '>= 1.27'
# rufus-scheduler v3.7 causes a failure in test/multi_process_test.rb
# rufus-scheduler v3.3 is missing a to_local method which fails tests
spec.add_runtime_dependency 'rufus-scheduler', '~> 3.2', '< 3.7', '!= 3.3'
spec.add_runtime_dependency 'rufus-scheduler', '~> 3.2', '!= 3.3'
end