Add single sidekiq process for new scheduler queue

This commit is contained in:
2021-12-05 16:27:05 -06:00
parent 38756fd296
commit a0de016e1c
2 changed files with 33 additions and 0 deletions

View File

@@ -77,6 +77,18 @@ template "/lib/systemd/system/mastodon-sidekiq.service" do
notifies :restart, "service[mastodon-sidekiq]", :delayed
end
# mastodon-sidekiq-scheduler service
#
template "/lib/systemd/system/mastodon-sidekiq-scheduler.service" do
source "mastodon-sidekiq-scheduler.systemd.service.erb"
variables user: mastodon_user,
app_dir: mastodon_path,
bundle_path: "/opt/ruby_build/builds/#{ruby_version}/bin/bundle",
sidekiq_threads: 1
notifies :run, "execute[systemctl daemon-reload]", :immediately
notifies :restart, "service[mastodon-sidekiq-scheduler]", :delayed
end
# mastodon-streaming service
#
template "/lib/systemd/system/mastodon-streaming.service" do
@@ -176,6 +188,10 @@ application mastodon_path do
action [:enable, :start]
end
service "mastodon-sidekiq-scheduler" do
action [:enable, :start]
end
service "mastodon-streaming" do
action [:enable, :start]
end