OnStableStudy interrupts current Lua script?

For those that make use of the Lua OnStableStudy hook to initiate some form of processing (ex. anonymization), has anyone noticed that an OnStableStudy trigger will interrupt an ongoing Lua script?

We have our stable study age set at 10 minutes, consistent with the general times used on PACS at our institution.

I’ve been debugging some Lua scripts recently and some require more than 10 minutes to execute. I noticed that the OnStableStudy triggers associated with new data received during the time I was testing my script would stop the execution of my script.

When I boost the stable age time to a very high value, my scripts are not interrupted by OnStableStudy triggers.

I don’t recall the OnStableStudy triggers causing me this problem in the past. I used to think the new OnStableStudy job would simply be placed on the queue to be executed when the current jobs finished.

Maybe someone can clarify how Lua script processes are handled.

I’m currently working with a Docker image based on mainline, version 1.0

Thanks,
John.

Hello,

This looks like issue 25:
https://bitbucket.org/sjodogne/orthanc/issues/25/deadlock-with-lua-scripts

This problem should be fixed part of the ongoing refactoring of the jobs engine (that will ultimately become Orthanc 1.4.0). This development is taking place in the “jobs” branch of the source code of Orthanc:
https://bitbucket.org/sjodogne/orthanc/branch/jobs

You can download precompiled binaries at the following places:

Please let us know if these new binaries fix your issue.

HTH,
Sébastien-

Thanks for the heads up. I may wait for the stable release. For the moment, I can address the issue with this particular instance I’m running by setting the stable lifetime to a large number.

john.