You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had an issue after upgrading to 5.2.2 when jobs where not running. Jobs were added to crontab correctly and looked correct. I compared it to the crontab that worked before and it was the same. The issue was that the method to run the job was no longer working. I used a new job_type to use new commands and resolve the issue. The problem is that && bundle exec bin/rails needed to drop the "bin" and just read && bundle exec rails. I'm not sure if anyone else has had or can recreate the issue.
Just to confirm, the only changes made to my environment when this occurred was upgrading from Rails 5.0.1 to Rails 5.2.2.
My environment is Ubuntu 16.04 self hosted but managed through Cloud66.
ruby 2.4.2p198
Rails 5.2.2
And thank you to the creators/maintainers of this awesome gem. Also, the ability to create a custom job_type made this issue very minor, so thank you for that as well.
The text was updated successfully, but these errors were encountered:
I had the same issue. My workaround was to create a rake task that simply calls my class method and create a cron job that runs the rake task. I got the added benefit of gaining a rake task I can manually run.
I had an issue after upgrading to 5.2.2 when jobs where not running. Jobs were added to crontab correctly and looked correct. I compared it to the crontab that worked before and it was the same. The issue was that the method to run the job was no longer working. I used a new job_type to use new commands and resolve the issue. The problem is that
&& bundle exec bin/rails
needed to drop the "bin" and just read&& bundle exec rails
. I'm not sure if anyone else has had or can recreate the issue.Just to confirm, the only changes made to my environment when this occurred was upgrading from Rails 5.0.1 to Rails 5.2.2.
Doesn't Work:
Default -
job_type :runner, "cd :path && bin/rails runner -e :environment ':task' :output"
Creates this cronjob -
/bin/bash -l -c 'cd /var/deploy/MyApp/web_head/releases/20190201171815 && bundle exec bin/rails runner -e staging '\'MyJob.perform_now'\'''
Working Version:
My Custom job_type -
job_type :new_runner, "cd :path && bundle exec rails runner -e :environment ':task' :output"
Creates this cronjob -
/bin/bash -l -c 'cd /var/deploy/MyApp/web_head/releases/20190201194724 && bundle exec rails runner -e staging '\''MyJob.perform_now'\'''
My environment is Ubuntu 16.04 self hosted but managed through Cloud66.
And thank you to the creators/maintainers of this awesome gem. Also, the ability to create a custom job_type made this issue very minor, so thank you for that as well.
The text was updated successfully, but these errors were encountered: