test
This commit is contained in:
parent
708ff883ef
commit
ea47469f20
@ -88,7 +88,6 @@ func setClientIdle(userID64 int64, from time.Time) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getLockedIdleClient() (*ChirpClient, error) {
|
func getLockedIdleClient() (*ChirpClient, error) {
|
||||||
fmt.Printf("getLockedIdleClient : starting.\n")
|
|
||||||
muxClients.RLock()
|
muxClients.RLock()
|
||||||
ids := make([]int64, 0)
|
ids := make([]int64, 0)
|
||||||
for _, c := range clients {
|
for _, c := range clients {
|
||||||
@ -104,7 +103,7 @@ func getLockedIdleClient() (*ChirpClient, error) {
|
|||||||
|
|
||||||
RndMux.Lock()
|
RndMux.Lock()
|
||||||
id := RndSrc.Intn(len(ids))
|
id := RndSrc.Intn(len(ids))
|
||||||
fmt.Printf("getLockedIdleClient : pulled (%d).\n", id)
|
fmt.Printf("getLockedIdleClient : pulled %s.\n", clients[ids[id]].Login)
|
||||||
RndMux.Unlock()
|
RndMux.Unlock()
|
||||||
|
|
||||||
clients[ids[id]].Mux.Lock()
|
clients[ids[id]].Mux.Lock()
|
||||||
|
4
job.go
4
job.go
@ -593,13 +593,11 @@ func jobMsgDelete(j Job) {
|
|||||||
err := setJobStart(j.ID64)
|
err := setJobStart(j.ID64)
|
||||||
logOnError(err, "jobMsgDel : setJobStart")
|
logOnError(err, "jobMsgDel : setJobStart")
|
||||||
|
|
||||||
log.Printf("jobMsgDelete[%d] : Starting.\n", j.ID64)
|
|
||||||
|
|
||||||
err = json.Unmarshal(j.Payload, &p)
|
err = json.Unmarshal(j.Payload, &p)
|
||||||
logOnError(err, "jobMsgDel : Unmarshal payload")
|
logOnError(err, "jobMsgDel : Unmarshal payload")
|
||||||
|
|
||||||
b, _ := json.Marshal(p)
|
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 {
|
if j.Trigger != 0 && p.MsgTypeID64 != 0 {
|
||||||
logOnError(err, "jobMsgDel : getObjMsg msg")
|
logOnError(err, "jobMsgDel : getObjMsg msg")
|
||||||
|
Loading…
Reference in New Issue
Block a user