I need to grab more data on this but basically when receiving many images at a time I’ve run into an issue where when I’m hitting the OnJobSuccess method with a job id that doesn’t exist. It would be too costly for me to set up an example of the production environment on this.
I can share the relevant code and errors I am hitting
function OnJobSuccess(jobId)
local JobDetails = ParseJson(RestApiGet(‘/jobs/’ … jobId))
local DicomDataPath = allApiUrls[‘archive_path’]
if (JobDetails.Type == ‘Archive’) then
//not relevant logic here
end
end
at this point I get this error out of logs:
E0715 18:14:56.056530 LuaScripting.cpp:417] Lua: Unknown resource
E0715 18:14:56.056536 LuaScripting.cpp:420] Lua: Error in RestApiGet() for URI: /jobs/a830ff88-fc03-49b8-a455-7bf72b285a40
E0715 18:14:56.056550 OrthancException.cpp:57] Cannot execute a Lua command: [string “line”]:85: attempt to index a nil value (local ‘JobDetails’)
E0715 18:14:56.056561 LuaScripting.cpp:772] Error while processing Lua events: Cannot execute a Lua command
I just don’t understand what circumstances could cause this to ever happen. Could it be that in time it took for OnJobSuccess to be hit I lost the job?
My configurations are here:
https://gist.github.com/Modicrumb/01b27652c06412763174c2caaf0a879b
and I am using Mysql to index but not store DICOMs, My Orthanc version is 1.8.2