This commit is contained in:
shoopea 2020-01-14 14:58:34 +08:00
parent 708ff883ef
commit ea47469f20
2 changed files with 2 additions and 5 deletions

View File

@ -88,7 +88,6 @@ func setClientIdle(userID64 int64, from time.Time) error {
}
func getLockedIdleClient() (*ChirpClient, error) {
fmt.Printf("getLockedIdleClient : starting.\n")
muxClients.RLock()
ids := make([]int64, 0)
for _, c := range clients {
@ -104,7 +103,7 @@ func getLockedIdleClient() (*ChirpClient, error) {
RndMux.Lock()
id := RndSrc.Intn(len(ids))
fmt.Printf("getLockedIdleClient : pulled (%d).\n", id)
fmt.Printf("getLockedIdleClient : pulled %s.\n", clients[ids[id]].Login)
RndMux.Unlock()
clients[ids[id]].Mux.Lock()

4
job.go
View File

@ -593,13 +593,11 @@ func jobMsgDelete(j Job) {
err := setJobStart(j.ID64)
logOnError(err, "jobMsgDel : setJobStart")
log.Printf("jobMsgDelete[%d] : Starting.\n", j.ID64)
err = json.Unmarshal(j.Payload, &p)
logOnError(err, "jobMsgDel : Unmarshal payload")
b, _ := json.Marshal(p)
log.Printf("jobMsgDelete[%d] : Payload => %s.\n", j.ID64, string(b))
log.Printf("jobMsgDelete[%d] : %d : Payload => %s.\n", j.ID64, j.UserID64, string(b))
if j.Trigger != 0 && p.MsgTypeID64 != 0 {
logOnError(err, "jobMsgDel : getObjMsg msg")