1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-02 15:48:35 +00:00

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`.
This commit is contained in:
Jason Song
2024-07-30 10:27:28 +08:00
committed by GitHub
parent 81fa471119
commit f989f46438
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