summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-06-26 16:00:39 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-06-26 17:06:41 +0000
commitb946a00ae92f1a573d51714b0a6b8b075fb5e792 (patch)
tree6fd14ba0d1f81af2bc98999c4c15f9e0fc09b080
parent97d6933f177d880105d3608d22f8dc8c7730e8a1 (diff)
downloadlorry-controller-baserock/liw/de-ghost.tar.gz
Add systemd units to remove ghost jobs automaticallybaserock/liw/de-ghost
-rw-r--r--units/lorry-controller-remove-ghost-jobs.service9
-rw-r--r--units/lorry-controller-remove-ghost-jobs.timer6
2 files changed, 15 insertions, 0 deletions
diff --git a/units/lorry-controller-remove-ghost-jobs.service b/units/lorry-controller-remove-ghost-jobs.service
new file mode 100644
index 0000000..585a039
--- /dev/null
+++ b/units/lorry-controller-remove-ghost-jobs.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Lorry Controller remove ghost jobs
+After=lighttpd-lorry-controller-webapp.service
+
+[Service]
+ExecStart=/usr/bin/curl -o /dev/null -X POST -d '' http://localhost:12765/1.0/remove-ghost-jobs
+Restart=no
+User=lorry
+Group=lorry
diff --git a/units/lorry-controller-remove-ghost-jobs.timer b/units/lorry-controller-remove-ghost-jobs.timer
new file mode 100644
index 0000000..bbbb003
--- /dev/null
+++ b/units/lorry-controller-remove-ghost-jobs.timer
@@ -0,0 +1,6 @@
+[Unit]
+Description=Lorry Controller remove ghost jobs
+After=lighttpd-lorry-controller-webapp.service
+
+[Timer]
+OnUnitInactiveSec=60