systemd_service "rails-jobs@" do
description "Rails job queue runner"
type "simple"
- environment "RAILS_ENV" => "production", "QUEUE" => "%I"
+ environment "RAILS_ENV" => "production", "QUEUE" => "%I", "SLEEP_DELAY" => "60"
user "rails"
working_directory rails_directory
exec_start "#{node[:ruby][:bundle]} exec rails jobs:work"
restart "on-failure"
+ nice 10
private_tmp true
private_devices true
protect_system "full"
user "rails"
group "adm"
exec_start "/usr/local/bin/api-statistics"
+ nice 10
private_tmp true
private_devices true
private_network true