changeset 642:a76d83a00c68

definition of stable resources
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 23 Apr 2021 10:34:13 +0200
parents a8925284df0b
children 411e82bb3a9f
files Sphinx/source/faq/features.rst Sphinx/source/plugins/python.rst
diffstat 2 files changed, 35 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Sphinx/source/faq/features.rst	Fri Apr 23 09:34:23 2021 +0200
+++ b/Sphinx/source/faq/features.rst	Fri Apr 23 10:34:13 2021 +0200
@@ -269,3 +269,37 @@
 
 Check out the :ref:`advanced features of the REST API <jobs>`.
 
+
+
+.. _stable-resources:
+
+Stable resources
+----------------
+
+A DICOM resource (patient, study or series) is referred to as
+**stable** if it has not received any new instance for a certain
+amount of time.
+
+This amount of time is configured by the the option ``StableAge`` in
+the :ref:`configuration file <configuration>`.
+
+When some resource becomes stable, an event is generated as a log
+entry in the ``/changes`` :ref:`URI in the REST API <changes>`, a
+:ref:`Lua callback <lua-callbacks>` is invoked, the callback function
+registered by ``OrthancPluginRegisterOnChangeCallback()`` in
+:ref:`C/C++ plugins <creating-plugins>` is executed, as well as the
+:ref:`Python callback <python-changes>` registered by
+``orthanc.RegisterOnChangeCallback()``.
+
+The ``IsStable`` field is also available to get the status of an
+individual patient/study/series using the REST API of Orthanc.
+
+In the multiple readers/writers scenario enabled since Orthanc 1.9.2,
+each Orthanc server is considered separately: The "stable" information
+is monitored by threads inside the Orthanc process, and is **not**
+shared in the database. In other words, the "stable" information is
+local to the Orthanc server that is queried.  Synchronization between
+multiple readers/writers must be implemented at a higher level
+(e.g. using a distributed `message-broker system
+<https://en.wikipedia.org/wiki/Message_broker>`__ such as RabbitMQ
+that is fed by an Orthanc plugin).
--- a/Sphinx/source/plugins/python.rst	Fri Apr 23 09:34:23 2021 +0200
+++ b/Sphinx/source/plugins/python.rst	Fri Apr 23 10:34:13 2021 +0200
@@ -395,7 +395,7 @@
 .. highlight:: python
 
 Here is a sample Python plugin that routes any :ref:`stable study
-<lua-callbacks>` to a modality named ``samples`` (as declared in the
+<stable-resources>` to a modality named ``samples`` (as declared in the
 ``DicomModalities`` configuration option)::
   
   import orthanc