MCPcopy Create free account
hub / github.com/astercloud/aster / ResumeExecution

Method ResumeExecution

pkg/workflow/engine.go:294–316  ·  view source on GitHub ↗

ResumeExecution 恢复执行

(executionID string)

Source from the content-addressed store, hash-verified

292
293// ResumeExecution 恢复执行
294func (e *Engine) ResumeExecution(executionID string) error {
295 e.executionsMu.RLock()
296 execution, exists := e.executions[executionID]
297 e.executionsMu.RUnlock()
298
299 if !exists {
300 return fmt.Errorf("execution not found: %s", executionID)
301 }
302
303 execution.mu.Lock()
304 defer execution.mu.Unlock()
305
306 if execution.Status != StatusPaused {
307 return fmt.Errorf("execution is not paused: %s", execution.Status)
308 }
309
310 execution.Status = StatusRunning
311
312 // 恢复执行
313 go e.continueExecution(execution)
314
315 return nil
316}
317
318// ListExecutions 列出执行记录
319func (e *Engine) ListExecutions(workflowID string, status WorkflowStatus, limit int) ([]*WorkflowExecution, error) {

Callers

nothing calls this directly

Calls 1

continueExecutionMethod · 0.95

Tested by

no test coverage detected