Oms API PUT job queue position - openmpp/openmpp.github.io GitHub Wiki

PUT model run job into other queue position.

This method is moving model run job request into other queue position, for example: move it to the top of the queue.

Only MPI cluster jobs queue can be re-ordered, using this on localhost queue does not actually change job position.

User can re-order only his own queue, other users queues are not affected. It is also impossible to move the job in front of other users job: if other user submitted model run before then it will be processed first.

This is a beta version and may change in the future.

Method:

PUT /api/service/job/move/:pos/:job

Arguments:

:pos - (required) new position in the queue.

Zero position is a top of the queue, if pos is negative it is treated as zero. If pos is greater then queue length it is terated as last position.

:job - (required) model run submission time stamp

Call examples:

curl -v -X PUT http://localhost:4040/api/service/job/move/99/2022_09_13_21_45_29_375

Example 1:

Move model run job 2022_09_13_21_45_29_375 to the top of the queue:

curl -v -X PUT http://localhost:4040/api/service/job/move/0/2022_09_13_21_45_29_375

*   Trying 127.0.0.1:4040...
* Connected to localhost (127.0.0.1) port 4040 (#0)
> PUT /api/service/job/move/0/2022_09_13_21_45_29_375 HTTP/1.1
> Host: localhost:4040
> User-Agent: curl/7.83.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Location: service/job/move/true/0/2022_09_13_21_45_29_375
< Content-Type: text/plain
< Date: Wed, 14 Sep 2022 01:48:02 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact

Example 2:

Move model run job 2022_09_13_21_45_29_375 to the bottom of the queue using position 99999999:

curl -v -X PUT http://localhost:4040/api/service/job/move/99999999/2022_09_13_21_45_29_375

*   Trying 127.0.0.1:4040...
* Connected to localhost (127.0.0.1) port 4040 (#0)
> PUT /api/service/job/move/99999999/2022_09_13_21_45_29_375 HTTP/1.1
> Host: localhost:4040
> User-Agent: curl/7.83.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Location: service/job/move/true/99999999/2022_09_13_21_45_29_375
< Content-Type: text/plain
< Date: Wed, 14 Sep 2022 01:50:22 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact
⚠️ **GitHub.com Fallback** ⚠️