Mercurial > hg > orthanc
comparison OrthancServer/Sources/ServerJobs/ThreadedSetOfInstancesJob.h @ 5134:6aa41d86b948
fix ModificationJob state machine
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 10 Jan 2023 11:46:00 +0100 |
parents | f2dcdbe05884 |
children | e71b22a43c0b |
comparison
equal
deleted
inserted
replaced
5133:7dacd2c3c009 | 5134:6aa41d86b948 |
---|---|
39 class ORTHANC_PUBLIC ThreadedSetOfInstancesJob : public IJob | 39 class ORTHANC_PUBLIC ThreadedSetOfInstancesJob : public IJob |
40 { | 40 { |
41 public: | 41 public: |
42 enum ThreadedJobStep // cannot use "Step" since there is a method with this name ! | 42 enum ThreadedJobStep // cannot use "Step" since there is a method with this name ! |
43 { | 43 { |
44 ThreadedJobStep_BeforeStart, | |
45 ThreadedJobStep_ProcessingInstances, | 44 ThreadedJobStep_ProcessingInstances, |
46 ThreadedJobStep_PostProcessingInstances, | 45 ThreadedJobStep_PostProcessingInstances, |
47 ThreadedJobStep_Cleanup, | 46 ThreadedJobStep_Cleanup, |
48 ThreadedJobStep_Done | 47 ThreadedJobStep_Done |
49 }; | 48 }; |
65 std::string description_; | 64 std::string description_; |
66 size_t workersCount_; | 65 size_t workersCount_; |
67 | 66 |
68 ServerContext& context_; | 67 ServerContext& context_; |
69 bool keepSource_; | 68 bool keepSource_; |
69 ErrorCode errorCode_; | |
70 protected: | 70 protected: |
71 mutable boost::recursive_mutex mutex_; | 71 mutable boost::recursive_mutex mutex_; |
72 | 72 |
73 public: | 73 public: |
74 ThreadedSetOfInstancesJob(ServerContext& context, | 74 ThreadedSetOfInstancesJob(ServerContext& context, |
99 const std::string& GetInstance(size_t index) const; | 99 const std::string& GetInstance(size_t index) const; |
100 | 100 |
101 bool HasPostProcessingStep() const; | 101 bool HasPostProcessingStep() const; |
102 | 102 |
103 bool HasCleanupStep() const; | 103 bool HasCleanupStep() const; |
104 | |
105 void SetErrorCode(ErrorCode errorCode); | |
106 | |
107 ErrorCode GetErrorCode() const; | |
104 | 108 |
105 public: | 109 public: |
106 | 110 |
107 ThreadedJobStep GetCurrentStep() const; | 111 ThreadedJobStep GetCurrentStep() const; |
108 | 112 |