alexdean / cron_swanson Goto Github PK
View Code? Open in Web Editor NEWprevent similar cron jobs from all starting at the same time
prevent similar cron jobs from all starting at the same time
ArgumentError:
tried to create Proc object without a block
# ./lib/cron_swanson/whenever.rb:86:in `new'
# ./lib/cron_swanson/whenever.rb:86:in `schedule'
# <eval>:2:in `initialize'
# ./spec/lib/cron_swanson/whenever_spec.rb:177:in `new'
# ./spec/lib/cron_swanson/whenever_spec.rb:177:in `block (4 levels) in <top (required)>'
# ./spec/lib/cron_swanson/whenever_spec.rb:170:in `each'
# ./spec/lib/cron_swanson/whenever_spec.rb:170:in `block (3 levels) in <top (required)>'
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:
export RAILS_ENV="staging" ; /usr/local/rvm/bin/rvm 2.7.5 do bundle exec whenever --update-crontab acme_staging --set environment=staging --roles=web,app,db,cron,waiting_room_upstart,delayed_job_upstart
Traceback (most recent call last):
17: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/bin/ruby_executable_hooks:22:in `<main>'
16: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/bin/ruby_executable_hooks:22:in `eval'
15: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/bin/whenever:23:in `<main>'
14: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/bin/whenever:23:in `load'
13: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/gems/whenever-1.0.0/bin/whenever:44:in `<top (required)>'
12: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/gems/whenever-1.0.0/lib/whenever/command_line.rb:6:in `execute'
11: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/gems/whenever-1.0.0/lib/whenever/command_line.rb:38:in `run'
10: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/gems/whenever-1.0.0/lib/whenever/command_line.rb:109:in `updated_crontab'
9: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/gems/whenever-1.0.0/lib/whenever/command_line.rb:57:in `whenever_cron'
8: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/gems/whenever-1.0.0/lib/whenever.rb:12:in `cron'
7: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/gems/whenever-1.0.0/lib/whenever.rb:12:in `new'
6: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/gems/whenever-1.0.0/lib/whenever/job_list.rb:25:in `initialize'
5: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/gems/whenever-1.0.0/lib/whenever/job_list.rb:25:in `instance_eval'
4: from config/schedule.rb:19:in `initialize'
3: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/gems/cron_swanson-0.3.4/lib/cron_swanson/whenever.rb:73:in `schedule'
2: from /var/www/acme/staging/master/shared/bundle/ruby/2.7.0/gems/cron_swanson-0.3.4/lib/cron_swanson/whenever.rb:73:in `instance_eval'
1: from config/schedule.rb:21:in `block in initialize'
/var/www/acme/staging/master/shared/bundle/ruby/2.7.0/gems/cron_swanson-0.3.4/lib/cron_swanson/whenever.rb:102:in `method_missing': environment is not defined. Call `job_type` to resolve this. (RuntimeError)
: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 a deploy.rb
or such locally, I'm open to suggestions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.