Rahul Singh
Rahul Singh

Reputation: 3427

Can we have two workers with different jobs in Procfile for Heroku?

I have the following in my Procfile:

worker: rake sf:subscribe
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
worker: bundle exec sidekiq

How can I have the above config?

Currently when I push my code on Heroku, the first worker task (rake sf:subscribe) is ignored.

Is there any other way to do that?

Upvotes: 1

Views: 290

Answers (1)

John Beynon
John Beynon

Reputation: 37507

Only the web process is 'hard coded' as it were - you can call your other processes whatever you want, eg worker1 and worker2, then start with heroku ps:scale worker1=1 and heroku ps:scale worker2=1

Upvotes: 3

Related Questions