fixes for shops jobs

This commit is contained in:
shoopea 2020-02-06 23:25:48 +08:00
parent 4473b69002
commit 7aac758ac0
3 changed files with 4 additions and 4 deletions

2
bot.go
View File

@ -800,7 +800,7 @@ func botShops(m *ChatWarsMessage) {
j2 := JobPayloadShopsSlave{
JobCallbackID64: jobID64,
Status: 0,
Slaves: len(clts),
Slaves: int64(len(clts)),
Shops: make([]string, 0),
}
for j, link := range cfg.Bot.Shops {

View File

@ -152,7 +152,7 @@ func getLockedAllIdleClientID64() ([]int64, error) {
for _, c := range clients {
if c.GameIdle {
ids = append(ids, c.TGUserID64)
clients[ids[id]].Mux.Lock()
clients[c.TGUserID64].Mux.Lock()
}
}
muxClients.RUnlock()

4
job.go
View File

@ -2181,7 +2181,7 @@ func jobCheckVaultLimit(j Job) {
func jobShops(j Job) {
err = setJobDone(j.ID64)
err := setJobDone(j.ID64)
logOnError(err, "jobShops : setJobDone")
return
@ -2189,7 +2189,7 @@ func jobShops(j Job) {
func jobShopsSlave(j Job) {
err = setJobDone(j.ID64)
err := setJobDone(j.ID64)
logOnError(err, "jobShopsSlave : setJobDone")
return