Mercurial > hg > orthanc-book
annotate Sphinx/source/plugins/delayed-deletion-plugin.rst @ 1113:a588960a72e5 default tip
spelling
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 28 Oct 2024 09:23:08 +0100 |
parents | b9fe60571a3e |
children |
rev | line source |
---|---|
861 | 1 .. _delayed-deletion-plugin: |
2 | |
3 | |
1043
683f238333cf
reorganized the list of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
861
diff
changeset
|
4 Delayed deletion plugin |
683f238333cf
reorganized the list of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
861
diff
changeset
|
5 ======================= |
683f238333cf
reorganized the list of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
861
diff
changeset
|
6 |
683f238333cf
reorganized the list of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
861
diff
changeset
|
7 .. contents:: |
861 | 8 |
9 This page describes the **official sample plugin** that performs | |
1043
683f238333cf
reorganized the list of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
861
diff
changeset
|
10 delayed deletions of storage files. This plugin was **introduced in |
683f238333cf
reorganized the list of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
861
diff
changeset
|
11 Orthanc 1.11.1** as part of its official distribution. |
861 | 12 |
13 On some file systems, the deletion of files can be quite long and therefore, | |
14 a ``DELETE`` request on a study with thousands of instances can last minutes. | |
15 | |
16 The Delayed deletion plugin handles file deletion asynchronously by pushing | |
17 the files to delete into a queue that is handled asynchronously. | |
18 This queue is stored in a SQLite DB stored on disk which allows the plugin | |
19 to resume deletions if Orthanc is stopped/restarted while deleting files. | |
20 | |
21 | |
22 Configuration | |
23 ------------- | |
24 | |
25 .. highlight:: json | |
26 | |
27 Here's a sample configuration section for this plugin with its default values:: | |
28 | |
29 { | |
30 "DelayedDeletion": { | |
31 | |
32 // Enables/disables the plugin | |
33 "Enable": false, | |
34 | |
35 // Delay (in milliseconds) between deletion of 2 files | |
36 // This avoids overloading Orthanc disk with the deletion | |
37 // of files and leaves room for other operations. | |
38 // '0' means no throttling. | |
39 "ThrottleDelayMs": 0, | |
40 | |
41 // Force the path of the SQLite DB | |
42 // By default, this value is generated by the plugin base on | |
43 // the "StorageDirectory" and "DatabaseServerIdentifier" | |
44 // configurations. | |
45 // If running multiple Orthanc on the same storage, make | |
46 // sure that they use different "Path" for the DelayedDeletion DB | |
47 // "Path": "/my/path/delayed-deletion.db" | |
48 } | |
49 } | |
50 | |
51 Working with multiple Orthanc instances | |
52 --------------------------------------- | |
53 | |
54 When running multiple instance on the same DB (e.g a PostgreSQL DB), each | |
55 Delayed Deletion plugin will maintain its own list of files to delete and | |
56 store it in its own SQLite DB. To make sure each instance has its own | |
57 DB, the plugin uses the ``DatabaseServerIdentifier`` configuration to | |
58 generate the name of the SQLite DB. | |
59 | |
60 | |
61 | |
62 Status | |
63 ------ | |
64 | |
1073
b9fe60571a3e
fixed delayed-deletion status url
Alain Mazy <am@orthanc.team>
parents:
1043
diff
changeset
|
65 You can get a progress status of the plugin by calling the ``/plugins/delayed-deletion/status`` API route. |
861 | 66 |
67 | |
68 Compilation | |
69 ----------- | |
70 | |
71 This plugin is part of the Orthanc core repository and is included in the Orthanc makefile. | |
72 It is compiled with Orthanc itself and is distributed together with Orthanc binaries. | |
73 | |
74 | |
75 |