Two-way variable implementation in the job submission end-point. Where Flamenco v2 did the variable replacement in the add-on, this has now been moved to the Manager itself. The only thing the add-on needs to pass is its platform, so that the right values can be recognised. This also implements two-way replacement when tasks are handed out, such that the `{jobs}` value gets replaced to a value suitable for the Worker's platform as well.
23 lines
497 B
Bash
Executable File
23 lines
497 B
Bash
Executable File
#!/bin/bash
|
|
|
|
curl -X 'POST' \
|
|
'http://localhost:8080/api/v3/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,
|
|
"sleep_repeats": 1,
|
|
"message": "Blender is {blender}"
|
|
},
|
|
"type": "echo-sleep-test",
|
|
"submitter_platform": "manager"
|
|
}'
|