All threads / Was wondering if there is a tutorial on how to setup background job server in Ubuntu with Rails

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Was wondering if there is a tutorial on how to setup background job server in Ubuntu with Rails

PDG Creative asked in Rails

Is this available somewhere?

For background jobs on Ubuntu, you would normally use SystemD.

With sidekiq, you would:

  1. Add the Sidekiq systemd script to /etc/systemd/system/sidekiq.service
  2. sudo systemctl daemon-reload
  3. sudo systemctl enable sidekiq
  4. sudo systemctl start sidekiq

daemon-reload refreshes systemd so it sees the new service.
enable allows it to start when the server boots.
start starts sidekiq

You then want to run sudo systemctl restart sidekiq on deploy so it can pickup the latest Rails code for the jobs.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 35,699+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.