[skip ci] Add comment for task state (#9757)

Signed-off-by: xige-16 <xi.ge@zilliz.com>
pull/9763/head
xige-16 2021-10-12 23:40:36 +08:00 committed by GitHub
parent a0fb28fea4
commit c2731dddff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -183,6 +183,7 @@ func (bt *BaseTask) Reschedule(ctx context.Context) ([]task, error) {
return nil, nil
}
// State returns the state of task, such as taskUndo, taskDoing, taskDone, taskExpired, taskFailed
func (bt *BaseTask) State() taskState {
bt.stateMu.RLock()
defer bt.stateMu.RUnlock()