whenever
whenever copied to clipboard
Define custom job class from another gem
I'm using Rollbar for error tracking and they have a wrapper for the rails runner
command which I would like to use via Whenever. Right now I define my own job type in schedule.rb
:
job_type :rollbar_runner, "cd :path && :environment_variable=:environment bundle exec rollbar-rails-runner :task --silent :output"
It would be great if the Rollbar gem could detect whether Whenever is present on load and define this job type itself. I tried to get it to work with Whenever::JobList.singleton_class
but wasn't successful.
Would this be possible/advisable?
+1 on this one @javan. I'm creating a gem for enqueueing Delayed Job jobs without the Rails stack and would like to also add a custom whenever job for folks to use if I detect that whenever is also installed.
Any quick tips on the easiest way to do this?
Thanks!