Fix timeout issues
This commit is contained in:
parent
d6155bf3a1
commit
86b2eea13a
@ -11,9 +11,10 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
color.Yellow("Refreshing anime characters...")
|
color.Yellow("Refreshing anime characters...")
|
||||||
|
|
||||||
|
allAnime, _ := arn.AllAnime()
|
||||||
rateLimiter := time.NewTicker(500 * time.Millisecond)
|
rateLimiter := time.NewTicker(500 * time.Millisecond)
|
||||||
|
|
||||||
for anime := range arn.MustStreamAnime() {
|
for _, anime := range allAnime {
|
||||||
<-rateLimiter.C
|
<-rateLimiter.C
|
||||||
|
|
||||||
chars, err := anime.RefreshAnimeCharacters()
|
chars, err := anime.RefreshAnimeCharacters()
|
||||||
|
@ -96,8 +96,10 @@ func main() {
|
|||||||
usersQueue := make(chan *arn.User, runtime.NumCPU())
|
usersQueue := make(chan *arn.User, runtime.NumCPU())
|
||||||
StartWorkers(usersQueue, Work)
|
StartWorkers(usersQueue, Work)
|
||||||
|
|
||||||
|
allUsers, _ := arn.AllUsers()
|
||||||
|
|
||||||
// We'll send each user to one of the worker threads
|
// We'll send each user to one of the worker threads
|
||||||
for user := range arn.MustStreamUsers() {
|
for _, user := range allUsers {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
usersQueue <- user
|
usersQueue <- user
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user