Flamenco/debug-job-echo.sh
Sybren A. Stüvel 0b39f229a1 Implement may-I-keep-running protocol
Worker and Manager implementation of the "may-I-kee-running" protocol.

While running tasks, the Worker will ask the Manager periodically
whether it's still allowed to keep running that task. This allows the
Manager to abort commands on Workers when:

- the Worker should go to another state (typically 'asleep' or
  'shutdown'),
- the task changed status from 'active' to something non-runnable
  (typically 'canceled' when the job as a whole is canceled).
- the task has been assigned to a different Worker. This can happen when
  a Worker loses its connection to its Manager, resulting in a task
  timeout (not yet implemented) after which the task can be assigned to
  another Worker. If then the connectivity is restored, the first Worker
  should abort (last-assigned Worker wins).
2022-05-12 15:06:05 +02:00

21 lines
435 B
Bash
Executable File

#!/bin/bash
curl -X 'POST' \
'http://localhost:8080/api/jobs' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"metadata": {
"project": "Debugging Flamenco",
"user.name": "dr. Sybren",
"duration": "long"
},
"name": "Talk & Sleep longer",
"priority": 3,
"settings": {
"sleep_duration_seconds": 20,
"message": "Blender is {blender}"
},
"type": "echo-sleep-test"
}'