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

Setting a shutdown timeout causes the CLI executor to throw an exception on shutdown. #318

Closed
mchristen opened this issue Aug 3, 2021 · 2 comments · Fixed by #319
Closed

Comments

@mchristen
Copy link

Using 1.12.0 if I run the following command then hit ctrl-c I get an exception. Removing the shutdown-timeout arg does not have this same behavior.

GOOD_JOB_POLL_INTERVAL=1 GOOD_JOB_MAX_THREADS=1 bundle exec good_job --shutdown-timeout 5

12: from ruby/2.7.2/bin/good_job:23:in `<main>'
11: from ruby/2.7.2/bin/good_job:23:in `load'
10: from ruby/2.7.2/lib/ruby/gems/2.7.0/gems/good_job-1.12.0/exe/good_job:7:in `<top (required)>'
9: from ruby/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
8: from ruby/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
7: from ruby/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
6: from ruby/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
5: from ruby/2.7.2/lib/ruby/gems/2.7.0/gems/good_job-1.12.0/lib/good_job/cli.rb:106:in `start'
4: from ruby/2.7.2/lib/ruby/gems/2.7.0/gems/good_job-1.12.0/lib/good_job.rb:136:in `_shutdown_all'
3: from ruby/2.7.2/lib/ruby/gems/2.7.0/gems/good_job-1.12.0/lib/good_job.rb:136:in `each'
2: from ruby/2.7.2/lib/ruby/gems/2.7.0/gems/good_job-1.12.0/lib/good_job.rb:136:in `block in _shutdown_all'
1: from ruby/2.7.2/lib/ruby/gems/2.7.0/gems/good_job-1.12.0/lib/good_job/multi_scheduler.rb:29:in `shutdown'
/home/.7.2/lib/ruby/gems/2.7.0/gems/good_job-1.12.0/lib/good_job.rb:135:in `_shutdown_all': undefined method `positive?' for nil:NilClass (NoMethodError)

I'm not entirely sure why this is blowing up, but it seems like this method is recursing through one of the send calls and causing issues by using timeout: nil.

@bensheldon
Copy link
Owner

Thanks for reporting this! I'm investigating.

@bensheldon
Copy link
Owner

@mchristen a fix has been released in v1.12.1.

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 a pull request may close this issue.

2 participants