[Unit]
Description=Sentry Worker
After=network.target

[Service]
User=<%= @user %>
Group=<%= @group %>
Type=simple
Environment=VIRTUAL_ENV="<%= @path %>"
Environment=PATH="$VIRTUAL_ENV/bin:$PATH"
WorkingDirectory=<%= @path %>
ExecStart=<%= @path %>/bin/sentry --config=<%= @path %> run worker -f /var/log/sentry/sentry-worker.log --concurrency <%= scope['::sentry::worker_concurrency'] %>
ExecStop=/bin/kill -KILL $MAINPID
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

[Unit]
Description=Sentry Worker
After=network.target

[Service]
User=<%= @user %>
Group=<%= @group %>
Type=simple
Environment=VIRTUAL_ENV="<%= @path %>"
Environment=PATH="$VIRTUAL_ENV/bin:$PATH"
WorkingDirectory=<%= @path %>
ExecStart=<%= @path %>/bin/sentry --config=<%= @path %> run worker -f /var/log/sentry/sentry-worker.log --concurrency <%= scope['::sentry::worker_concurrency'] %>
ExecStop=/bin/kill -KILL $MAINPID
ExecReload=/bin/kill -HUP $MAINPID
Restart=always

[Install]
WantedBy=multi-user.target

Add restart=always flag to worker unit
Add restart=always flag to worker unit
