File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,16 @@ func (t *TaskStatus) colorfulStatusString() string {
97
97
return statusOK ("NORMAL" )
98
98
}
99
99
100
+ func (t * TaskStatus ) statusString () string {
101
+ if t .paused && len (t .LastErrors ) > 0 {
102
+ return "ERROR"
103
+ }
104
+ if t .paused {
105
+ return "PAUSE"
106
+ }
107
+ return "NORMAL"
108
+ }
109
+
100
110
// GetCheckpoint calculates the checkpoint of the task.
101
111
func (t TaskStatus ) GetMinStoreCheckpoint () Checkpoint {
102
112
initialized := false
@@ -194,6 +204,7 @@ func (p *printByJSON) PrintTasks() {
194
204
Name string `json:"name"`
195
205
StartTS uint64 `json:"start_ts,omitempty"`
196
206
EndTS uint64 `json:"end_ts,omitempty"`
207
+ Status string `json:"status"`
197
208
TableFilter []string `json:"table_filter"`
198
209
Progress []storeProgress `json:"progress"`
199
210
Storage string `json:"storage"`
@@ -223,6 +234,7 @@ func (p *printByJSON) PrintTasks() {
223
234
Name : t .Info .GetName (),
224
235
StartTS : t .Info .GetStartTs (),
225
236
EndTS : t .Info .GetEndTs (),
237
+ Status : t .statusString (),
226
238
TableFilter : t .Info .GetTableFilter (),
227
239
Progress : sp ,
228
240
Storage : s .String (),
You can’t perform that action at this time.
0 commit comments