diff Sphinx/source/plugins/delayed-deletion-plugin.rst @ 861:c3e169fe22da

delayed deletion
author Alain Mazy <am@osimis.io>
date Thu, 30 Jun 2022 17:59:23 +0200
parents
children 683f238333cf
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sphinx/source/plugins/delayed-deletion-plugin.rst	Thu Jun 30 17:59:23 2022 +0200
@@ -0,0 +1,72 @@
+.. _delayed-deletion-plugin:
+
+
+Delayed deletion plugin (new in Orthanc 1.11.1)
+===============================================
+
+This page describes the **official sample plugin** that performs
+delayed deletions of storage files.
+
+On some file systems, the deletion of files can be quite long and therefore,
+a ``DELETE`` request on a study with thousands of instances can last minutes.
+
+The Delayed deletion plugin handles file deletion asynchronously by pushing
+the files to delete into a queue that is handled asynchronously.
+This queue is stored in a SQLite DB stored on disk which allows the plugin
+to resume deletions if Orthanc is stopped/restarted while deleting files.
+
+
+Configuration
+-------------
+
+.. highlight:: json
+
+Here's a sample configuration section for this plugin with its default values::
+
+  {
+    "DelayedDeletion": {
+
+      // Enables/disables the plugin
+      "Enable": false,
+
+      // Delay (in milliseconds) between deletion of 2 files
+      // This avoids overloading Orthanc disk with the deletion
+      // of files and leaves room for other operations.
+      // '0' means no throttling.
+      "ThrottleDelayMs": 0,
+
+      // Force the path of the SQLite DB
+      // By default, this value is generated by the plugin base on
+      // the "StorageDirectory" and "DatabaseServerIdentifier"
+      // configurations.
+      // If running multiple Orthanc on the same storage, make
+      // sure that they use different "Path" for the DelayedDeletion DB
+      // "Path": "/my/path/delayed-deletion.db"
+    }
+  }
+
+Working with multiple Orthanc instances
+---------------------------------------
+
+When running multiple instance on the same DB (e.g a PostgreSQL DB), each
+Delayed Deletion plugin will maintain its own list of files to delete and
+store it in its own SQLite DB.  To make sure each instance has its own
+DB, the plugin uses the ``DatabaseServerIdentifier`` configuration to 
+generate the name of the SQLite DB.
+
+
+
+Status
+------
+
+You can get a progress status of the plugin by calling the ``/delayed-deletion/status`` API route.
+
+
+Compilation
+-----------
+
+This plugin is part of the Orthanc core repository and is included in the Orthanc makefile.  
+It is compiled with Orthanc itself and is distributed together with Orthanc binaries.
+
+
+