@@ -52,9 +52,9 @@ func cleanExpiredArtifacts(taskCtx context.Context) error {
52
52
}
53
53
if err := storage .ActionsArtifacts .Delete (artifact .StoragePath ); err != nil {
54
54
log .Error ("Cannot delete artifact %d: %v" , artifact .ID , err )
55
- continue
55
+ // go on
56
56
}
57
- log .Info ("Artifact %d set expired " , artifact .ID )
57
+ log .Info ("Artifact %d is deleted (due to expiration) " , artifact .ID )
58
58
}
59
59
return nil
60
60
}
@@ -76,9 +76,9 @@ func cleanNeedDeleteArtifacts(taskCtx context.Context) error {
76
76
}
77
77
if err := storage .ActionsArtifacts .Delete (artifact .StoragePath ); err != nil {
78
78
log .Error ("Cannot delete artifact %d: %v" , artifact .ID , err )
79
- continue
79
+ // go on
80
80
}
81
- log .Info ("Artifact %d set deleted" , artifact .ID )
81
+ log .Info ("Artifact %d is deleted (due to pending deletion) " , artifact .ID )
82
82
}
83
83
if len (artifacts ) < deleteArtifactBatchSize {
84
84
log .Debug ("No more artifacts pending deletion" )
@@ -103,8 +103,7 @@ func CleanupLogs(ctx context.Context) error {
103
103
for _ , task := range tasks {
104
104
if err := actions_module .RemoveLogs (ctx , task .LogInStorage , task .LogFilename ); err != nil {
105
105
log .Error ("Failed to remove log %s (in storage %v) of task %v: %v" , task .LogFilename , task .LogInStorage , task .ID , err )
106
- // do not return error here, continue to next task
107
- continue
106
+ // do not return error here, go on
108
107
}
109
108
task .LogIndexes = nil // clear log indexes since it's a heavy field
110
109
task .LogExpired = true
0 commit comments