plashchynski / crono

A time-based background job scheduler daemon (just like Cron) for Rails
https://github.com/plashchynski/crono
Apache License 2.0
687 stars 56 forks source link

Repair "wrong number of arguments" error. #94

Closed c4lliope closed 2 years ago

c4lliope commented 2 years ago

For some reason, the argument destructuring *args is causing an error. Passing variables along manually helps the code run properly.

[grace@chesapeake reap]$ bundle exec crono RAILS_ENV=development
wrong number of arguments (given 2, expected 1)
/home/grace/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/crono-1.1.2/lib/crono/period.rb:7:in `initialize'
/home/grace/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/crono-1.1.2/lib/crono/performer_proxy.rb:11:in `new'
/home/grace/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/crono-1.1.2/lib/crono/performer_proxy.rb:11:in `every'
/home/grace/Desktop/assembled.app/reap/config/cronotab.rb:14:in `<main>'