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

преди 7 месеца
123456789101112131415161718192021
  1. package task
  2. import (
  3. "applet/app/task/svc"
  4. "math/rand"
  5. "time"
  6. )
  7. func taskKuaishouAuth() {
  8. for {
  9. if len(ch) > workerNum {
  10. time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000)))
  11. } else {
  12. goto START
  13. }
  14. }
  15. START:
  16. ch <- 1
  17. svc.KuaishouAuth()
  18. <-ch
  19. }