]> git.openstreetmap.org Git - chef.git/commitdiff
Restrict queue runners on the main site to the mailers queue
authorTom Hughes <tom@compton.nu>
Sun, 24 Mar 2019 18:52:04 +0000 (18:52 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 24 Mar 2019 18:52:04 +0000 (18:52 +0000)
cookbooks/web/recipes/frontend.rb
cookbooks/web/recipes/rails.rb

index 71a7c4384ac6e408b905f4db93c0558eeaad11f6..eb95b18f7b49982c4c14d4b697f5ad9dcd6c36e7 100644 (file)
@@ -50,6 +50,10 @@ template "/etc/logrotate.d/apache2" do
 end
 
 service "rails-jobs" do
+  action [:stop, :disable]
+end
+
+service "rails-jobs@mailers" do
   action [:enable, :start]
   supports :restart => true
   subscribes :restart, "rails_port[www.openstreetmap.org]"
index b11da462bc9a10db1e84f8ee22d4c00e583431a9..1ab7bc1da25343a4d4eb68c6ee90adfb87c8fe94 100644 (file)
@@ -94,8 +94,13 @@ rails_port "www.openstreetmap.org" do
 end
 
 systemd_service "rails-jobs" do
+  action :delete
+end
+
+systemd_service "rails-jobs@" do
   description "Rails job queue runner"
   type "simple"
+  environment "QUEUE" => "%I"
   user "rails"
   working_directory rails_directory
   exec_start "/usr/local/bin/bundle#{ruby_version} exec rake jobs:work"