Define custom job class from another gem
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 8.9k
- Forks
- 715
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the custom job_type in schedule.rb and the attempted Whenever::JobList.singleton_class integration. Inspect how Whenever defines and loads job types, then consider whether the Rollbar rails runner command can be registered without requiring an unsafe gem coupling. Done means a supported integration path or a documented reason it is not advisable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100