Mercurial > hg > orthanc
changeset 3162:94a4f75cc746
Fix issue #119 (/patients/.../archive returns a 500 when JobsHistorySize is 0)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 24 Jan 2019 16:47:05 +0100 |
parents | 5cf29046c159 |
children | cf91b6f22278 |
files | Core/JobsEngine/JobsRegistry.cpp NEWS Resources/Configuration.json |
diffstat | 3 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/JobsEngine/JobsRegistry.cpp Thu Jan 24 16:16:56 2019 +0100 +++ b/Core/JobsEngine/JobsRegistry.cpp Thu Jan 24 16:47:05 2019 +0100 @@ -755,9 +755,11 @@ { if (!GetStateInternal(state, id)) { - // Job has finished and has been lost (should not happen) - state = JobState_Failure; - break; + // Job has finished and has been lost (typically happens if + // "JobsHistorySize" is 0) + throw OrthancException(ErrorCode_InexistentItem, + "Cannot retrieve the status of the job, " + "make sure that \"JobsHistorySize\" is not 0"); } else if (state == JobState_Failure) {
--- a/NEWS Thu Jan 24 16:16:56 2019 +0100 +++ b/NEWS Thu Jan 24 16:47:05 2019 +0100 @@ -1,9 +1,10 @@ Pending changes in the mainline =============================== +* Don't return tags whose group is below 0x0008 in C-FIND SCP answers * Fix compatibility with DICOMweb plugin (allow multipart answers over HTTP Keep-Alive) +* Fix issue #119 (/patients/.../archive returns a 500 when JobsHistorySize is 0) * Fix issue #128 (Asynchronous C-MOVE: invalid number of remaining sub-operations) -* Don't return tags whose group is below 0x0008 in C-FIND SCP Version 1.5.2 (2019-01-18) @@ -29,7 +30,7 @@ Maintenance ----------- -* Don't consider tags whose group is below 0x0008 in C-FIND SCP +* Ignore tags whose group is below 0x0008 in C-FIND SCP requests * Compatibility with DCMTK 3.6.4 * Fix issue #21 (DICOM files missing after uploading with Firefox) * Fix issue #32 (HTTP keep-alive is now enabled by default)
--- a/Resources/Configuration.json Thu Jan 24 16:16:56 2019 +0100 +++ b/Resources/Configuration.json Thu Jan 24 16:47:05 2019 +0100 @@ -438,7 +438,9 @@ // processing job is considered as complete once it is tagged as // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0" // indicates to keep no job in memory (i.e. jobs are removed from - // the history as soon as they are completed). + // the history as soon as they are completed), which prevents the + // use of some features of Orthanc (typically, synchronous mode in + // REST API) and should be avoided for non-developers. "JobsHistorySize" : 10, // Specifies how Orthanc reacts when it receives a DICOM instance