counter usa i 'chanel'
This commit is contained in:
parent
a3a02eac55
commit
36f6aa8a83
6 changed files with 127 additions and 43 deletions
10
producer.go
10
producer.go
|
@ -60,9 +60,15 @@ func producer() {
|
|||
// log.Printf("PROD (%d): user=%s login=%d in %v - conn=%d\n", id, user, len(logs), time.Since(start), dbs.rdb.ActiveCount())
|
||||
}
|
||||
|
||||
count.AddUser()
|
||||
counter <- Counterchan{
|
||||
tipo: "user",
|
||||
val: 1,
|
||||
}
|
||||
wg.Add(1)
|
||||
count.AddWG()
|
||||
counter <- Counterchan{
|
||||
tipo: "wg",
|
||||
val: 1,
|
||||
}
|
||||
|
||||
consume <- produced{
|
||||
user: user,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue