Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update task access time #909

Merged
merged 10 commits into from
Dec 10, 2021
Prev Previous commit
Next Next commit
update task access time when task is downloading
Signed-off-by: sunwp <[email protected]>
  • Loading branch information
244372610 committed Dec 9, 2021
commit 6ec378136fc7442b1d94b99c2d85536538cf1605
4 changes: 4 additions & 0 deletions cdn/supervisor/progress/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ func (pm *Manager) PublishPiece(ctx context.Context, taskID string, record *type
logger.Debugf("seed piece meta record %#v", record)
pm.mu.Lock(taskID, false)
defer pm.mu.UnLock(taskID, false)
// update task access time
if _, err := pm.taskMgr.Get(taskID); err != nil {
return err
}
err := pm.setPieceMetaRecord(taskID, record)
if err != nil {
return fmt.Errorf("set piece meta record: %v", err)
Expand Down