A few lines of Ruby with pg
driver
is a simple alternative to a job queuing library.
Job queues are defined as database tables
and workers are defined in one Ruby file.
queuea: bundle exec ruby queue/a.rb
queueb: bundle exec ruby queue/b.rb
I run one worker per queue on Heroku.
heroku ps:scale queuea=1,queueb=2
Depending on the queue requirements, either polling or pub/sub may be appropriate.
I think the trigger upsert needs to be