mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Change @every 24h default schedules to @midnight (#16431)
This commit is contained in:
@ -36,7 +36,7 @@ func registerRepoHealthCheck() {
|
||||
BaseConfig: BaseConfig{
|
||||
Enabled: true,
|
||||
RunAtStart: false,
|
||||
Schedule: "@every 24h",
|
||||
Schedule: "@midnight",
|
||||
},
|
||||
Timeout: 60 * time.Second,
|
||||
Args: []string{},
|
||||
@ -50,7 +50,7 @@ func registerCheckRepoStats() {
|
||||
RegisterTaskFatal("check_repo_stats", &BaseConfig{
|
||||
Enabled: true,
|
||||
RunAtStart: true,
|
||||
Schedule: "@every 24h",
|
||||
Schedule: "@midnight",
|
||||
}, func(ctx context.Context, _ *models.User, _ Config) error {
|
||||
return models.CheckRepoStats(ctx)
|
||||
})
|
||||
@ -61,7 +61,7 @@ func registerArchiveCleanup() {
|
||||
BaseConfig: BaseConfig{
|
||||
Enabled: true,
|
||||
RunAtStart: true,
|
||||
Schedule: "@every 24h",
|
||||
Schedule: "@midnight",
|
||||
},
|
||||
OlderThan: 24 * time.Hour,
|
||||
}, func(ctx context.Context, _ *models.User, config Config) error {
|
||||
@ -75,7 +75,7 @@ func registerSyncExternalUsers() {
|
||||
BaseConfig: BaseConfig{
|
||||
Enabled: true,
|
||||
RunAtStart: false,
|
||||
Schedule: "@every 24h",
|
||||
Schedule: "@midnight",
|
||||
},
|
||||
UpdateExisting: true,
|
||||
}, func(ctx context.Context, _ *models.User, config Config) error {
|
||||
@ -89,7 +89,7 @@ func registerDeletedBranchesCleanup() {
|
||||
BaseConfig: BaseConfig{
|
||||
Enabled: true,
|
||||
RunAtStart: true,
|
||||
Schedule: "@every 24h",
|
||||
Schedule: "@midnight",
|
||||
},
|
||||
OlderThan: 24 * time.Hour,
|
||||
}, func(ctx context.Context, _ *models.User, config Config) error {
|
||||
@ -103,7 +103,7 @@ func registerUpdateMigrationPosterID() {
|
||||
RegisterTaskFatal("update_migration_poster_id", &BaseConfig{
|
||||
Enabled: true,
|
||||
RunAtStart: true,
|
||||
Schedule: "@every 24h",
|
||||
Schedule: "@midnight",
|
||||
}, func(ctx context.Context, _ *models.User, _ Config) error {
|
||||
return migrations.UpdateMigrationPosterID(ctx)
|
||||
})
|
||||
@ -114,7 +114,7 @@ func registerCleanupHookTaskTable() {
|
||||
BaseConfig: BaseConfig{
|
||||
Enabled: true,
|
||||
RunAtStart: false,
|
||||
Schedule: "@every 24h",
|
||||
Schedule: "@midnight",
|
||||
},
|
||||
CleanupType: "OlderThan",
|
||||
OlderThan: 168 * time.Hour,
|
||||
|
Reference in New Issue
Block a user