summaryrefslogtreecommitdiff
path: root/recording/task.go
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-07-29 21:23:33 +0800
committerKeuin <[email protected]>2023-07-29 21:23:33 +0800
commit2f0ef363eabce940314dc33f5966335642722fa2 (patch)
tree2aaf04c39c1f2b6fe31d3d98b56372f072f50a88 /recording/task.go
parent110301a975e43739192577166d089e28c22ae266 (diff)
Distinguish waiting and recording status
Diffstat (limited to 'recording/task.go')
-rw-r--r--recording/task.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/recording/task.go b/recording/task.go
index 43b6678..d1f9c79 100644
--- a/recording/task.go
+++ b/recording/task.go
@@ -18,14 +18,16 @@ type TaskStatus int
const (
StNotStarted TaskStatus = iota
- StRunning
+ StWaiting
+ StRecording
StRestarting
StStopped
)
var taskStatusStrings = map[TaskStatus]string{
StNotStarted: "ready",
- StRunning: "running",
+ StWaiting: "waiting",
+ StRecording: "recording",
StRestarting: "restarting",
StStopped: "stopped",
}
@@ -94,7 +96,7 @@ func (t *RunningTask) StartTask() error {
t.runTaskWithAutoRestart()
}()
return nil
- case StRunning:
+ case StWaiting, StRecording:
return ErrTaskIsAlreadyStarted
case StRestarting:
return ErrTaskIsAlreadyStarted