Move registerActionsCleanup to initActionsTasks (#31721)

There's already `initActionsTasks`; it will avoid additional check for
if Actions enabled to move `registerActionsCleanup` into it.

And we don't really need `OlderThanConfig`.

(cherry picked from commit f989f464386139592b6911cad1be4c901eb97fe5)
This commit is contained in:
Jason Song 2024-07-30 10:27:28 +08:00 committed by Earl Warren
parent 92fbc8e216
commit 43b184cf07
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 12 additions and 20 deletions

View file

@ -5,7 +5,6 @@ package actions
import (
"context"
"time"
"code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/modules/log"
@ -13,7 +12,7 @@ import (
)
// Cleanup removes expired actions logs, data and artifacts
func Cleanup(taskCtx context.Context, olderThan time.Duration) error {
func Cleanup(taskCtx context.Context) error {
// TODO: clean up expired actions logs
// clean up expired artifacts