MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / execute

Method execute

TaskFlow/core/Flow.cpp:171–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171FlowState Flow::execute()
172{
173 emit executionStarted();
174
175 if (!isValid()) {
176 emit executionFinished(FlowState::Failed);
177 return FlowState::Failed;
178 }
179
180 if (hasCircularDependencies()) {
181 qWarning() << "Flow::execute - Circular dependencies detected";
182 emit executionFinished(FlowState::Failed);
183 return FlowState::Failed;
184 }
185
186 QList<BaseTask *> executionOrder = getExecutionOrder();
187
188 for (BaseTask *task : executionOrder) {
189 TaskState taskResult = task->execute();
190
191 if (taskResult == TaskState::Failed) {
192 qWarning() << "Flow::execute - Task" << task->taskId() << "failed";
193 emit executionFinished(FlowState::Failed);
194 return FlowState::Failed;
195 }
196
197 if (taskResult == TaskState::Cancelled) {
198 qWarning() << "Flow::execute - Task" << task->taskId() << "cancelled";
199 emit executionFinished(FlowState::Cancelled);
200 return FlowState::Cancelled;
201 }
202 }
203
204 emit executionFinished(FlowState::Success);
205 return FlowState::Success;
206}
207
208bool Flow::isValid() const
209{

Callers

nothing calls this directly

Calls 1

taskIdMethod · 0.45

Tested by

no test coverage detected