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 264 B

5 years ago
123456789101112131415161718192021
  1. package timer
  2. import (
  3. "time"
  4. "code.gitea.io/gitea/routers/repo"
  5. )
  6. const (
  7. DecompressTimer = time.Minute * 10
  8. )
  9. func init() {
  10. ticker := time.NewTicker(DecompressTimer)
  11. go func() {
  12. for {
  13. <- ticker.C
  14. repo.HandleUnDecompressAttachment()
  15. }
  16. } ()
  17. }