From 5cf3f8eb6df06994bade02db6006ea8a102d02ae Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 26 Jun 2014 16:00:39 +0000 Subject: Add systemd units to remove ghost jobs automatically --- units/lorry-controller-remove-ghost-jobs.service | 9 +++++++++ units/lorry-controller-remove-ghost-jobs.timer | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 units/lorry-controller-remove-ghost-jobs.service create mode 100644 units/lorry-controller-remove-ghost-jobs.timer 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 -- cgit v1.2.1