lib/generators/capistrano/sidekiq/systemd/templates/sidekiq.service.capistrano.erb in capistrano-sidekiq-systemd-0.1.0 vs lib/generators/capistrano/sidekiq/systemd/templates/sidekiq.service.capistrano.erb in capistrano-sidekiq-systemd-0.2.0
- old
+ new
@@ -7,9 +7,12 @@
Environment=RAILS_ENV=<%= fetch(:rails_env) %>
WorkingDirectory=<%= fetch(:deploy_to) %>/current
ExecStart=<%= sidekiq_cmd %> <%= process_options(index) %>
ExecReload=/bin/kill -TSTP $MAINPID
ExecStop=/bin/kill -TERM $MAINPID
+<%="StandardOutput=append:#{fetch(:sidekiq_log)}" if fetch(:sidekiq_log) %>
+<%="StandardError=append:#{fetch(:sidekiq_error_log)}" if fetch(:sidekiq_error_log) %>
+<%="User=#{sidekiq_user(role)}" if sidekiq_user(role) %>
<%= "MemoryAccounting=#{ !!max_mem(index) }" if max_mem(index) %>
<%= "MemoryLimit=#{ max_mem(index) }" if max_mem(index) %>
# Greatly reduce Ruby memory fragmentation and heap usage
# https://www.mikeperham.com/2018/04/25/taming-rails-memory-bloat/