]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/recipes/rails.rb
oxidized: add accounts dependency
[chef.git] / cookbooks / web / recipes / rails.rb
index c60655f9e74a797856a4d09211781f891b099250..e021f19251e045d141592bfe56ecfb7665dabddc 100644 (file)
@@ -152,11 +152,12 @@ end
 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"
@@ -193,6 +194,7 @@ systemd_service "api-statistics" do
   user "rails"
   group "adm"
   exec_start "/usr/local/bin/api-statistics"
+  nice 10
   private_tmp true
   private_devices true
   private_network true