Mercurial > hg > orthanc
comparison OrthancFramework/Sources/JobsEngine/JobsRegistry.cpp @ 4300:b30a8de92ad9
abi continued
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 05 Nov 2020 19:33:18 +0100 |
parents | 0ae2ca210077 |
children | 44b53a2c0a13 |
comparison
equal
deleted
inserted
replaced
4299:3f85db78c441 | 4300:b30a8de92ad9 |
---|---|
39 static const char* CREATION_TIME = "CreationTime"; | 39 static const char* CREATION_TIME = "CreationTime"; |
40 static const char* LAST_CHANGE_TIME = "LastChangeTime"; | 40 static const char* LAST_CHANGE_TIME = "LastChangeTime"; |
41 static const char* RUNTIME = "Runtime"; | 41 static const char* RUNTIME = "Runtime"; |
42 | 42 |
43 | 43 |
44 JobsRegistry::IObserver::~IObserver() | |
45 { | |
46 } | |
47 | |
48 | |
44 class JobsRegistry::JobHandler : public boost::noncopyable | 49 class JobsRegistry::JobHandler : public boost::noncopyable |
45 { | 50 { |
46 private: | 51 private: |
47 std::string id_; | 52 std::string id_; |
48 JobState state_; | 53 JobState state_; |
707 | 712 |
708 // WARNING: The following call might make "handler" invalid if | 713 // WARNING: The following call might make "handler" invalid if |
709 // the job history size is empty | 714 // the job history size is empty |
710 ForgetOldCompletedJobs(); | 715 ForgetOldCompletedJobs(); |
711 } | 716 } |
717 } | |
718 | |
719 JobsRegistry::JobsRegistry(size_t maxCompletedJobs) : | |
720 maxCompletedJobs_(maxCompletedJobs), | |
721 observer_(NULL) | |
722 { | |
712 } | 723 } |
713 | 724 |
714 | 725 |
715 void JobsRegistry::Submit(std::string& id, | 726 void JobsRegistry::Submit(std::string& id, |
716 IJob* job, // Takes ownership | 727 IJob* job, // Takes ownership |