handle exit logic

This commit is contained in:
yoan
2025-01-10 07:25:09 +08:00
parent ebffac7ba4
commit db10ed8378
4 changed files with 32 additions and 8 deletions

View File

@@ -94,16 +94,16 @@ func (w *WorkflowRepository) SaveRun(ctx context.Context, run *domain.WorkflowRu
}
// unable trigger sse using DB()
wordflowRecord, err := txDao.FindRecordById("workflow", run.WorkflowId)
workflowRecord, err := txDao.FindRecordById("workflow", run.WorkflowId)
if err != nil {
return err
}
wordflowRecord.Set("lastRunId", record.GetId())
wordflowRecord.Set("lastRunStatus", record.GetString("status"))
wordflowRecord.Set("lastRunTime", record.GetString("startedAt"))
workflowRecord.Set("lastRunId", record.GetId())
workflowRecord.Set("lastRunStatus", record.GetString("status"))
workflowRecord.Set("lastRunTime", record.GetString("startedAt"))
return txDao.SaveRecord(wordflowRecord)
return txDao.SaveRecord(workflowRecord)
})
if err != nil {
return err