Jason
Jason

Reputation: 1129

How to monitor heroku worker dyno?

I usually just run "heroku run rake jobs:work" from the command line. The great thing about this apporach is that I get intimidate feedback on whether a job failed or not and what jobs are currently processing.

However, now I need to run "heroku ps:scale worker=1"

Is there a way to see what the worker is processing just like with the rake task via the command line?

Upvotes: 1

Views: 528

Answers (2)

Rafal
Rafal

Reputation: 2576

You can use the heroku command like to access the log of the worker.

heroku logs -t --ps worker will show you what is currently being executed on your worker.

I also recommend to use gem workless which scales your worker up only when needed. This can save you a lot of money

Upvotes: 1

infused
infused

Reputation: 24337

You didn't say specifically what queue you are running, but it sounds like delayed_job. If so, you can install the delayed_job_web gem. Basic setup is as simple as adding it you your Gemfile and adding a route for it. Then you can browser to your site /delayed_job and manage the jobs.

Upvotes: 0

Related Questions