Change @every 24h default schedules to @midnight (#16431)

This commit is contained in:
Jimmy Praet 2021-07-15 17:55:48 +02:00 committed by GitHub
parent 195c9999a1
commit 8df3d6575a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 23 deletions

View file

@ -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,