Skip to content

Oms API PUT job queue position

amc1999 edited this page Sep 14, 2022 · 5 revisions

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

Home

Getting Started

Model development in OpenM++

Using OpenM++

Model Development Topics

OpenM++ web-service: API and cloud setup

Using OpenM++ from Python and R

Docker

OpenM++ Development

OpenM++ Design, Roadmap and Status

OpenM++ web-service API

GET Model Metadata

GET Model Extras

GET Model Run results metadata

GET Model Workset metadata: set of input parameters

Read Parameters, Output Tables or Microdata values

GET Parameters, Output Tables or Microdata values

GET Parameters, Output Tables or Microdata as CSV

GET Modeling Task metadata and task run history

Update Model Profile: set of key-value options

Update Model Workset: set of input parameters

Update Model Runs

Update Modeling Tasks

Run Models: run models and monitor progress

Download model, model run results or input parameters

Upload model runs or worksets (input scenarios)

Download and upload user files

User: manage user settings

Model run jobs and service state

Administrative: manage web-service state

Clone this wiki locally