Added user count

This commit is contained in:
Eduard Urbach 2017-06-15 17:03:22 +02:00
parent bccee5968b
commit eb10ec15e2

View File

@ -33,6 +33,7 @@ func main() {
// Log
avatarLog.AddOutput(log.File("logs/avatar.log"))
defer avatarLog.Flush()
// Define the avatar sources
avatarSources = []AvatarSource{
@ -75,14 +76,19 @@ func main() {
}
// Stream of all users
users, _ := arn.AllUsers()
users, _ := arn.FilterUsers(func(user *arn.User) bool {
return true
})
// Log user count
println(len(users), "users")
// Worker queue
usersQueue := make(chan *arn.User)
StartWorkers(usersQueue, Work)
// We'll send each user to one of the worker threads
for user := range users {
for _, user := range users {
usersQueue <- user
}