whenever icon indicating copy to clipboard operation
whenever copied to clipboard

Define custom job class from another gem

Open manuelmeurer opened this issue 9 years ago • 1 comments

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?

manuelmeurer avatar Jul 02 '15 11:07 manuelmeurer

+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!

smoyte avatar Sep 29 '15 03:09 smoyte