A
A
apecherin2014-01-27 20:52:11
Ruby on Rails
apecherin, 2014-01-27 20:52:11

Ruby on rails: running delayed_jobs and mailman on Heroku

Good evening guys.
There is a RoR application deployed on Heroku. I'm using the mailman gem ( https://github.com/titanous/mailman ) to process incoming emails and the delayed_job_active_record gem ( https://github.com/collectiveidea/delayed_job ) to handle delayed jobs (outgoing messages via ActionMailer). To run mailman processes on Heroku, a "Heroku worker" is required (I have a rake task named jobs:work. This task runs the mailman script). To start delayed_jobs processes, I want to use Heroku Scheduler (run every 10 minutes rake jobs:workoff). But when I run my app on Heroku - my worker runs rake jobs:work and that runs processes for delayed_jobs but doesn't run rake task for mailman.
My question is: How can I configure Heroku worker to run another rake task (it's "bundle exec rake jobs:work" now) or "exclude this task from delayed_jobs"? Or maybe I can use ONE Heroku worker to use both of these gems?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan, 2014-10-29
@IvanTheCrazy

First you need to see what you have in the Procfile, maybe both delayed_job and mailman are registered there, if delayed_job is the first one, and you have 1 "Heroku worker", only delayed_job will start.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question