Mercurial > hg > orthanc
comparison OrthancServer/ServerContext.cpp @ 2616:2f3007bf0708 jobs
event queues in Lua, serialization of sequence of operations
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 22 May 2018 12:25:37 +0200 |
parents | 3ff4c50647ea |
children | 912a767911b0 |
comparison
equal
deleted
inserted
replaced
2614:3200223f9ade | 2616:2f3007bf0708 |
---|---|
112 area_(area), | 112 area_(area), |
113 compressionEnabled_(false), | 113 compressionEnabled_(false), |
114 storeMD5_(true), | 114 storeMD5_(true), |
115 provider_(*this), | 115 provider_(*this), |
116 dicomCache_(provider_, DICOM_CACHE_SIZE), | 116 dicomCache_(provider_, DICOM_CACHE_SIZE), |
117 lua_(*this), | 117 luaEventHandler_(*this), |
118 #if ORTHANC_ENABLE_PLUGINS == 1 | 118 #if ORTHANC_ENABLE_PLUGINS == 1 |
119 plugins_(NULL), | 119 plugins_(NULL), |
120 #endif | 120 #endif |
121 done_(false), | 121 done_(false), |
122 queryRetrieveArchive_(Configuration::GetGlobalUnsignedIntegerParameter("QueryRetrieveSize", 10)), | 122 queryRetrieveArchive_(Configuration::GetGlobalUnsignedIntegerParameter("QueryRetrieveSize", 10)), |
123 defaultLocalAet_(Configuration::GetGlobalStringParameter("DicomAet", "ORTHANC")) | 123 defaultLocalAet_(Configuration::GetGlobalStringParameter("DicomAet", "ORTHANC")) |
124 { | 124 { |
125 listeners_.push_back(ServerListener(lua_, "Lua")); | 125 listeners_.push_back(ServerListener(luaEventHandler_, "Lua")); |
126 | 126 |
127 jobsEngine_.SetWorkersCount(Configuration::GetGlobalUnsignedIntegerParameter("ConcurrentJobs", 2)); | 127 jobsEngine_.SetWorkersCount(Configuration::GetGlobalUnsignedIntegerParameter("ConcurrentJobs", 2)); |
128 //jobsEngine_.SetMaxCompleted // TODO | 128 //jobsEngine_.SetMaxCompleted // TODO |
129 jobsEngine_.Start(); | 129 jobsEngine_.Start(); |
130 | 130 |
578 | 578 |
579 plugins_ = &plugins; | 579 plugins_ = &plugins; |
580 | 580 |
581 // TODO REFACTOR THIS | 581 // TODO REFACTOR THIS |
582 listeners_.clear(); | 582 listeners_.clear(); |
583 listeners_.push_back(ServerListener(lua_, "Lua")); | 583 listeners_.push_back(ServerListener(luaEventHandler_, "Lua")); |
584 listeners_.push_back(ServerListener(plugins, "plugin")); | 584 listeners_.push_back(ServerListener(plugins, "plugin")); |
585 } | 585 } |
586 | 586 |
587 | 587 |
588 void ServerContext::ResetPlugins() | 588 void ServerContext::ResetPlugins() |
591 | 591 |
592 plugins_ = NULL; | 592 plugins_ = NULL; |
593 | 593 |
594 // TODO REFACTOR THIS | 594 // TODO REFACTOR THIS |
595 listeners_.clear(); | 595 listeners_.clear(); |
596 listeners_.push_back(ServerListener(lua_, "Lua")); | 596 listeners_.push_back(ServerListener(luaEventHandler_, "Lua")); |
597 } | 597 } |
598 | 598 |
599 | 599 |
600 const OrthancPlugins& ServerContext::GetPlugins() const | 600 const OrthancPlugins& ServerContext::GetPlugins() const |
601 { | 601 { |