Change @every 24h default schedules to @midnight (#16431)
This commit is contained in:
parent
195c9999a1
commit
8df3d6575a
4 changed files with 23 additions and 23 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue