changeset 671:bc8fa2bf4cf7

asynchronous c-move
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 03 May 2021 14:11:39 +0200
parents f32934bdad14
children 8bda16db46cf
files Sphinx/source/users/advanced-rest.rst Sphinx/source/users/rest.rst
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Sphinx/source/users/advanced-rest.rst	Mon May 03 12:43:28 2021 +0200
+++ b/Sphinx/source/users/advanced-rest.rst	Mon May 03 14:11:39 2021 +0200
@@ -136,6 +136,11 @@
 calls), waiting for the ``State`` field to become ``Success`` or
 ``Failure``.
 
+Note that the `integration tests of Orthanc
+<https://hg.orthanc-server.com/orthanc-tests/file/Orthanc-1.9.2/Tests/Toolbox.py>`__
+give an example about how to monitor a job in Python using the REST
+API (cf. function ``MonitorJob()``).
+
 
 .. _jobs-controlling:
 
--- a/Sphinx/source/users/rest.rst	Mon May 03 12:43:28 2021 +0200
+++ b/Sphinx/source/users/rest.rst	Mon May 03 14:11:39 2021 +0200
@@ -853,8 +853,8 @@
   $ curl --request POST --url http://localhost:8042/queries/5af318ac-78fb-47ff-b0b0-0df18b0588e0/answers/0/retrieve --data Orthanc
 
 If C-Moves take too long (for example, performing a C-Move of a big
-study), you may run the request in asynchronous fashion, which will
-create a job in Orthanc::
+study), you may run the request in :ref:`asynchronous mode <jobs>`,
+which will create a job in Orthanc::
 
   $ curl --request POST --url http://localhost:8042/queries/5af318ac-78fb-47ff-b0b0-0df18b0588e0/retrieve \
     --data '{"TargetAet":"Orthanc","Synchronous":false}'
@@ -862,7 +862,9 @@
 
 .. highlight:: bash
 
-The answer of this POST request is the job ID taking care of the C-Move::
+The answer of this POST request is the job ID taking care of the
+C-Move command, :ref:`whose status can be monitored <jobs-monitoring>`
+in order to detect failure or completion::
 
   {
       "ID" : "11541b16-e368-41cf-a8e9-3acf4061d238",