-
Notifications
You must be signed in to change notification settings - Fork 1
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
whenever gem 1.0.0 compatibility issue #3
Comments
cron_swanson/lib/cron_swanson/whenever.rb Lines 70 to 73 in 660bfe2
it looks like a method cron_swanson/lib/cron_swanson/whenever.rb Lines 99 to 103 in 660bfe2
can you confirm if this happens in all crontabs, or could it be specific to the one you're trying to deploy? (are you making a call to |
Apologies for the delayed reply, I apparently missed or accidentally nuked the notification! We do in fact call swanson.schedule(interval: 2.minutes, roles: [:waiting_room_upstart]) do
services = [
"acme_master_#{environment}_waiting_room_consumer",
"acme_master_#{environment}_waiting_room_publisher",
]
script "acme_upstart_angel #{services.join(' ')}"
end
swanson.schedule(interval: 2.minutes, roles: [:delayed_job_upstart]) do
script "acme_upstart_angel acme_master_#{environment}_delayed_job_supervisor"
end I can confirm removing these above entries resolves this issue, so appreciate the hint/pointer on calling I can also share that the issue presents in v0.10.0 of whenever. I see that there is a new However debugging with a debugger shows me the difference in values of [15, 24] in config/schedule.rb
15| # 2. config/deploy.rb can have only `set :whenever_roles, %w(cron)`
16| # 3. script/acme_upstart_angel can be deleted
17| #
18| # https://www.pivotaltracker.com/story/show/172502059
19| swanson.schedule(interval: 2.minutes, roles: [:waiting_room_upstart]) do
=> 20| debugger
21| services = [
22| "acme_master_#{environment}_waiting_room_consumer",
23| "acme_master_#{environment}_waiting_room_publisher",
24| ]
=>#0 block in initialize at config/schedule.rb:20
#1 [C] BasicObject#instance_eval at ~/.rvm/gems/ruby-2.7.5@acme/gems/cron_swanson-0.3.4/lib/cron_swanson/whenever.rb:73
# and 13 frames (use `bt' command for all frames)
(rdbg) environment
[[:environment, [], nil]] vesus v0.10.0 [15, 24] in config/schedule.rb
15| # 2. config/deploy.rb can have only `set :whenever_roles, %w(cron)`
16| # 3. script/acme_upstart_angel can be deleted
17| #
18| # https://www.pivotaltracker.com/story/show/172502059
19| swanson.schedule(interval: 2.minutes, roles: [:waiting_room_upstart]) do
=> 20| debugger
21| services = [
22| "acme_master_#{environment}_waiting_room_consumer",
23| "acme_master_#{environment}_waiting_room_publisher",
24| ]
=>#0 block in initialize at config/schedule.rb:20
#1 [C] BasicObject#instance_eval at ~/.rvm/gems/ruby-2.7.5@acme/gems/cron_swanson-0.3.4/lib/cron_swanson/whenever.rb:73
# and 13 frames (use `bt' command for all frames)
(rdbg) environment
eval error: environment is not defined. Call `job_type` to resolve this.
/Users/mzagaja/.rvm/gems/ruby-2.7.5@acme/gems/cron_swanson-0.3.4/lib/cron_swanson/whenever.rb:102:in `method_missing'
(rdbg)/config/schedule.rb:1:in `block in initialize'
nil The easy solution here seems to be replace |
When attempting to update an app to whenever 1.0.0 the deployment throws the following error:
Whenever and cron_swanson throw the following error on deployment to staging:
:whenever_environment
is just using the default value from the gem and changing to-> { fetch(:stage) }
did not impact this error. I'm guessing this gem has to account for a change in the whenever gem potentially related to javan/whenever#728 or javan/whenever#719. However if you think it might be a change that needs to be made to adeploy.rb
or such locally, I'm open to suggestions.The text was updated successfully, but these errors were encountered: