comparison Sphinx/source/users/advanced-rest.rst @ 833:24a2ce71a161

job priority
author Alain Mazy <am@osimis.io>
date Fri, 22 Apr 2022 09:03:26 +0200
parents e95713f90614
children c29ac12e3160
comparison
equal deleted inserted replaced
832:28fbceb66b0b 833:24a2ce71a161
33 stopped. The command-line option ``--no-jobs`` can also be used to 33 stopped. The command-line option ``--no-jobs`` can also be used to
34 prevent the loading of jobs from the database upon the launch of 34 prevent the loading of jobs from the database upon the launch of
35 Orthanc. 35 Orthanc.
36 36
37 Note that the queue of pending jobs has no size limit. 37 Note that the queue of pending jobs has no size limit.
38
39
40 38
41 .. _jobs-synchronicity: 39 .. _jobs-synchronicity:
42 40
43 Synchronous vs. asynchronous calls 41 Synchronous vs. asynchronous calls
44 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 42 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142 140
143 Note that the `integration tests of Orthanc 141 Note that the `integration tests of Orthanc
144 <https://hg.orthanc-server.com/orthanc-tests/file/Orthanc-1.10.1/Tests/Toolbox.py>`__ 142 <https://hg.orthanc-server.com/orthanc-tests/file/Orthanc-1.10.1/Tests/Toolbox.py>`__
145 give an example about how to monitor a job in Python using the REST 143 give an example about how to monitor a job in Python using the REST
146 API (cf. function ``MonitorJob()``). 144 API (cf. function ``MonitorJob()``).
145
146
147 .. _jobs-priority:
148
149 Jobs priority
150 ^^^^^^^^^^^^^
151
152 When executing jobs, Orthanc will pick the jobs with the highest ``Priority``
153 from the pending job list. An integer value is a valid ``Priority``. You may
154 also use negative number to lower the priority below the default one (``0``).
155
156 Pending jobs are not ordered in the API response but they are picked up in the right order.
147 157
148 158
149 .. _jobs-controlling: 159 .. _jobs-controlling:
150 160
151 Interacting with jobs 161 Interacting with jobs