Mercurial > hg > orthanc
comparison OrthancServer/Sources/LuaScripting.h @ 5410:16cbfefa15e9
Solved a deadlock related to the Job Engine events and plugins
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 07 Nov 2023 12:52:37 +0100 |
parents | 0ea402b4d901 |
children | 48b8dae6dc77 |
comparison
equal
deleted
inserted
replaced
5409:68231ca4363a | 5410:16cbfefa15e9 |
---|---|
22 | 22 |
23 #pragma once | 23 #pragma once |
24 | 24 |
25 #include "DicomInstanceToStore.h" | 25 #include "DicomInstanceToStore.h" |
26 #include "ServerIndexChange.h" | 26 #include "ServerIndexChange.h" |
27 #include "JobEvent.h" | |
27 #include "ServerJobs/LuaJobManager.h" | 28 #include "ServerJobs/LuaJobManager.h" |
28 | 29 |
29 #include "../../OrthancFramework/Sources/MultiThreading/SharedMessageQueue.h" | 30 #include "../../OrthancFramework/Sources/MultiThreading/SharedMessageQueue.h" |
30 #include "../../OrthancFramework/Sources/Lua/LuaContext.h" | 31 #include "../../OrthancFramework/Sources/Lua/LuaContext.h" |
31 | 32 |
45 | 46 |
46 class ExecuteEvent; | 47 class ExecuteEvent; |
47 class IEvent; | 48 class IEvent; |
48 class OnStoredInstanceEvent; | 49 class OnStoredInstanceEvent; |
49 class StableResourceEvent; | 50 class StableResourceEvent; |
50 class JobEvent; | 51 class LuaJobEvent; |
51 class DeleteEvent; | 52 class DeleteEvent; |
52 class UpdateEvent; | 53 class UpdateEvent; |
53 | 54 |
54 static ServerContext* GetServerContext(lua_State *state); | 55 static ServerContext* GetServerContext(lua_State *state); |
55 | 56 |
126 const DicomInstanceToStore& instance, | 127 const DicomInstanceToStore& instance, |
127 const Json::Value& simplified); | 128 const Json::Value& simplified); |
128 | 129 |
129 void Execute(const std::string& command); | 130 void Execute(const std::string& command); |
130 | 131 |
131 void SignalJobSubmitted(const std::string& jobId); | 132 void SignalJobEvent(const JobEvent& event); |
132 | |
133 void SignalJobSuccess(const std::string& jobId); | |
134 | |
135 void SignalJobFailure(const std::string& jobId); | |
136 | 133 |
137 TimeoutDicomConnectionManager& GetDicomConnectionManager() | 134 TimeoutDicomConnectionManager& GetDicomConnectionManager() |
138 { | 135 { |
139 return jobManager_.GetDicomConnectionManager(); | 136 return jobManager_.GetDicomConnectionManager(); |
140 } | 137 } |