droboticflow/internal/domain/capture_activation.go

16 lines
414 B
Go

package domain
// CaptureAwaitingFirstRun excludes claims in progress and every historical
// attempt. Only these records may change workflow ownership at activation.
func CaptureAwaitingFirstRun(record CaptureRecord) bool {
if record.RunID != "" {
return false
}
switch record.Status {
case CaptureRecordIncomplete, CaptureRecordStabilizing, CaptureRecordReady:
return true
default:
return false
}
}