Commit c896f81f authored by Andrew Lee's avatar Andrew Lee

Added systemd obsapidelayed.service file.

Signed-off-by: Andrew Lee's avatarAndrew Lee (李健秋) <ajqlee@debian.org>
parent 36f89186
......@@ -13,3 +13,6 @@ etc/cron.d/obs_api_delayed_jobs_monitor
usr/share/obs/overview/overview.html.TEMPLATE
debian/rake-tasks.sh /usr/share/obs/api/script/
debian/systemd/obsapidelayed.service /lib/systemd/system/
......@@ -83,6 +83,7 @@ override_dh_systemd_enable:
obsdodup.service \
obspublisher.service \
obssigner.service
dh_systemd_enable -p obs-api obsapidelayed.service
override_dh_installinit:
dh_installinit --name obsapidelayed --no-start
......@@ -98,7 +99,7 @@ override_dh_systemd_start:
obsdodup.service \
obspublisher.service \
obssigner.service
dh_systemd_start -p obs-api obsapidelayed.service
override_dh_auto_test:
dh_auto_test || true # temporary ignore
[Unit]
Description=OBS API Delayed server
After=network.target
[Service]
EnvironmentFile=/etc/default/obs-server
ExecStart=/bin/bash -c "/usr/bin/echo -n 'Starting OBS api delayed job handler'"
ExecStart=chroot --userspec=www-data:www-data / /bin/bash -c "cd /usr/share/obs/api && /usr/bin/bundle exec script/delayed_job.api.rb --queue=quick start -n 3"
ExecStart=chroot --userspec=www-data:www-data / /bin/bash -c "cd /usr/share/obs/api && /usr/bin/bundle exec script/delayed_job.api.rb --queue=releasetracking start -i 1000"
ExecStart=chroot --userspec=www-data:www-data / /bin/bash -c "cd /usr/share/obs/api && /usr/bin/bundle exec script/delayed_job.api.rb --queue=issuetracking start -i 1010"
ExecStart=chroot --userspec=www-data:www-data / /bin/bash -c "cd /usr/share/obs/api && /usr/bin/bundle exec script/delayed_job.api.rb --queue=mailers start -i 1020"
ExecStart=chroot --userspec=www-data:www-data / /bin/bash -c "cd /usr/share/obs/api && /usr/bin/bundle exec script/delayed_job.api.rb start -i 1030"
ExecStart=/bin/bash -c "/usr/bin/echo -n 'Starting OBS api clock daemon'"
ExecStart=chroot --userspec=www-data:www-data / /bin/bash -c "cd /usr/share/obs/api && /usr/bin/bundle exec /usr/bin/clockworkd --log-dir=log -l -c config/clock.rb start"
ExecStop=/bin/bash -c "/usr/bin/echo -n 'Shutting down OBS api delayed job handler'"
ExecStop=chroot --userspec=www-data:www-data / /bin/bash -c "cd /usr/share/obs/api && /usr/bin/bundle exec script/delayed_job.api.rb --queue=quick stop -n 3"
ExecStop=chroot --userspec=www-data:www-data / /bin/bash -c "cd /usr/share/obs/api && /usr/bin/bundle exec script/delayed_job.api.rb --queue=releasetracking stop -i 1000"
ExecStop=chroot --userspec=www-data:www-data / /bin/bash -c "cd /usr/share/obs/api && /usr/bin/bundle exec script/delayed_job.api.rb --queue=issuetracking stop -i 1010"
ExecStop=chroot --userspec=www-data:www-data / /bin/bash -c "cd /usr/share/obs/api && /usr/bin/bundle exec script/delayed_job.api.rb --queue=mailers stop -i 1020"
ExecStop=chroot --userspec=www-data:www-data / /bin/bash -c "cd /usr/share/obs/api && /usr/bin/bundle exec script/delayed_job.api.rb stop -i 1030"
ExecStop=/bin/bash -c "/usr/bin/echo -n 'Shutting down OBS api clock daemon'"
ExecStop=chroot --userspec=www-data:www-data / /bin/bash -c "cd /usr/share/obs/api && /usr/bin/bundle exec /usr/bin/clockworkd --log-dir=log -l -c config/clock.rb stop"
KillMode=process
[Install]
WantedBy=multi-user.target
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment