You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

timer.go 607 B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
1234567891011121314151617181920
  1. package timer
  2. import (
  3. "github.com/robfig/cron/v3"
  4. "code.gitea.io/gitea/routers/repo"
  5. )
  6. func init() {
  7. c := cron.New()
  8. spec := "*/10 * * * *"
  9. c.AddFunc(spec, repo.HandleUnDecompressAttachment)
  10. specCheckBlockChainUserSuccess := "*/10 * * * *"
  11. c.AddFunc(specCheckBlockChainUserSuccess, repo.HandleBlockChainUnSuccessUsers)
  12. specCheckRepoBlockChainSuccess := "*/5 * * * *"
  13. c.AddFunc(specCheckRepoBlockChainSuccess, repo.HandleBlockChainUnSuccessRepos)
  14. specCheckBlockChainCommitSuccess := "*/3 * * * *"
  15. c.AddFunc(specCheckBlockChainCommitSuccess, repo.HandleBlockChainUnSuccessCommits)
  16. c.Start()
  17. }