Mercurial > hg > orthanc
comparison Core/JobsEngine/SetOfCommandsJob.cpp @ 3658:2d90dd30858c storage-commitment
providing job ID to the IJob::Step() methods
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 10 Feb 2020 16:44:26 +0100 |
parents | 94f4a18a79cc |
children | 56f2397f027a |
comparison
equal
deleted
inserted
replaced
3657:115f82775c46 | 3658:2d90dd30858c |
---|---|
143 return *commands_[index]; | 143 return *commands_[index]; |
144 } | 144 } |
145 } | 145 } |
146 | 146 |
147 | 147 |
148 JobStepResult SetOfCommandsJob::Step() | 148 JobStepResult SetOfCommandsJob::Step(const std::string& jobId) |
149 { | 149 { |
150 if (!started_) | 150 if (!started_) |
151 { | 151 { |
152 throw OrthancException(ErrorCode_InternalError); | 152 throw OrthancException(ErrorCode_InternalError); |
153 } | 153 } |
167 } | 167 } |
168 | 168 |
169 try | 169 try |
170 { | 170 { |
171 // Not at the trailing step: Handle the current command | 171 // Not at the trailing step: Handle the current command |
172 if (!commands_[position_]->Execute()) | 172 if (!commands_[position_]->Execute(jobId)) |
173 { | 173 { |
174 // Error | 174 // Error |
175 if (!permissive_) | 175 if (!permissive_) |
176 { | 176 { |
177 return JobStepResult::Failure(ErrorCode_InternalError, NULL); | 177 return JobStepResult::Failure(ErrorCode_InternalError, NULL); |