|
|
@@ -164,13 +164,13 @@ func registerHandleBlockChainUnSuccessCommits() { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
func registerHandleRepoStatistic() { |
|
|
|
RegisterTaskFatal("handle_repo_statistic", &BaseConfig{ |
|
|
|
func registerHandleRepoAndUserStatistic() { |
|
|
|
RegisterTaskFatal("handle_repo_and_user_statistic", &BaseConfig{ |
|
|
|
Enabled: true, |
|
|
|
RunAtStart: false, |
|
|
|
Schedule: "@daily", |
|
|
|
}, func(ctx context.Context, _ *models.User, _ Config) error { |
|
|
|
repo.RepoStatisticAuto() |
|
|
|
repo.StatisticAuto() |
|
|
|
return nil |
|
|
|
}) |
|
|
|
} |
|
|
@@ -185,16 +185,6 @@ func registerHandleSummaryStatistic() { |
|
|
|
return nil |
|
|
|
}) |
|
|
|
} |
|
|
|
func registerHandleUserStatistic() { |
|
|
|
RegisterTaskFatal("handle_user_statistic", &BaseConfig{ |
|
|
|
Enabled: true, |
|
|
|
RunAtStart: false, |
|
|
|
Schedule: "@daily", |
|
|
|
}, func(ctx context.Context, _ *models.User, _ Config) error { |
|
|
|
repo.TimingCountData() |
|
|
|
return nil |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
func registerHandleClearRepoStatisticFile() { |
|
|
|
RegisterTaskFatal("handle_repo_clear_statistic_file", &BaseConfig{ |
|
|
@@ -222,7 +212,6 @@ func initBasicTasks() { |
|
|
|
registerHandleBlockChainMergedPulls() |
|
|
|
registerHandleBlockChainUnSuccessCommits() |
|
|
|
|
|
|
|
registerHandleRepoStatistic() |
|
|
|
registerHandleUserStatistic() |
|
|
|
registerHandleRepoAndUserStatistic() |
|
|
|
registerHandleSummaryStatistic() |
|
|
|
} |