summaryrefslogtreecommitdiff
path: root/yarns.webapp
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-06-23 13:35:30 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-06-23 14:19:36 +0000
commitbd214214053de9cf146e75f7ee4ad68c3d4a959c (patch)
treec9051647615b02a9279aafecda5c998c581d6a9e /yarns.webapp
parentc1ab077b62fc4b760bd93610d0441587618f0a41 (diff)
downloadlorry-controller-bd214214053de9cf146e75f7ee4ad68c3d4a959c.tar.gz
Forget "kill_job" flag for future runs of a lorryliw/anti-exterminate
We do this by moving the "kill_job" column from the lorries table to the jobs table, renaming it to "kill" in the process. It makes no sense to have the flag to kill a specific job in the lorries table. This avoids the need to reset the flag, since it affects only a specific job, instead of all jobs of a lorry.
Diffstat (limited to 'yarns.webapp')
-rw-r--r--yarns.webapp/040-running-jobs.yarn13
1 files changed, 6 insertions, 7 deletions
diff --git a/yarns.webapp/040-running-jobs.yarn b/yarns.webapp/040-running-jobs.yarn
index f637b0b..879d9fa 100644
--- a/yarns.webapp/040-running-jobs.yarn
+++ b/yarns.webapp/040-running-jobs.yarn
@@ -58,7 +58,7 @@ Requesting another job should now again return null.
Inform WEBAPP the job is finished.
WHEN MINION makes request POST /1.0/job-update with job_id=1&exit=0
- THEN response has kill_job set to false
+ THEN response has kill set to false
WHEN admin makes request GET /1.0/lorry/upstream/foo
THEN response has running_job set to null
WHEN admin makes request GET /1.0/list-running-jobs
@@ -140,14 +140,13 @@ Admin will now ask WEBAPP to kill the job. This changes sets a field
in the STATEDB only.
WHEN admin makes request POST /1.0/stop-job with job_id=1
- AND admin makes request GET /1.0/lorry/upstream/foo
- THEN response has kill_job set to true
+ THEN response has kill set to true
Now, when MINION updates the job, WEBAPP will tell it to kill it.
MINION will do so, and then update the job again.
WHEN MINION makes request POST /1.0/job-update with job_id=1&exit=no
- THEN response has kill_job set to true
+ THEN response has kill set to true
WHEN MINION makes request POST /1.0/job-update with job_id=1&exit=1
Admin will now see that the job has, indeed, been killed.
@@ -166,7 +165,7 @@ successfully run.
THEN response has job_id set to 2
AND response has path set to "upstream/foo"
WHEN MINION makes request POST /1.0/job-update with job_id=2&exit=no
- THEN response has kill_job set to false
+ THEN response has kill set to false
Cleanup.
@@ -219,7 +218,7 @@ Pretend to be a MINION that reports an update on the job. WEBAPP
should now be telling us to kill the job.
WHEN MINION makes request POST /1.0/job-update with job_id=1&exit=no
- THEN response has kill_job set to true
+ THEN response has kill set to true
Kill the job, as requested.
@@ -232,7 +231,7 @@ a lorry that had ever been killed would never run successfully again.
WHEN admin makes request POST /1.0/give-me-job with host=testhost&pid=123
THEN response has job_id set to 2
WHEN MINION makes request POST /1.0/job-update with job_id=2&exit=no
- THEN response has kill_job set to false
+ THEN response has kill set to false
Cleanup.