func (tc *timeoutCommand) Done(o *basic.Object) error { defer o.ProcessSeqnum() if tc.te.ta.OnTimer(tc.te.h, tc.te.ud) == false { if tc.te.times < 0 { StopTimer(tc.te.h) } } return nil }
func (stc *stopTimerCommand) Done(o *basic.Object) error { defer o.ProcessSeqnum() if v, ok := TimerModule.tq.ref[stc.h]; ok { heap.Remove(TimerModule.tq, v) } return nil }
func (trc *taskReqCommand) Done(o *basic.Object) error { defer o.ProcessSeqnum() workerName, err := TaskExecutor.c.Get(trc.n) if err != nil { return err } worker := TaskExecutor.GetWorker(workerName) if worker != nil { SendTaskExe(worker.Object, trc.t) } else { return TaskErr_CannotFindWorker } return nil }
func (stc *startTimerCommand) Done(o *basic.Object) error { defer o.ProcessSeqnum() te := &TimerEntity{ sink: o, ud: stc.ud, ta: stc.ta, interval: stc.interval, times: stc.times, h: stc.h, next: time.Now().Add(stc.interval), } heap.Push(TimerModule.tq, te) return nil }
func (trc *transactYieldCommand) Done(o *basic.Object) error { defer o.ProcessSeqnum() trc.tnode.checkExeOver() return nil }
func (ttc *taskExeCommand) Done(o *basic.Object) error { defer o.ProcessSeqnum() return ttc.t.run() }
func (cmd *cmdlineCommand) Done(o *basic.Object) error { defer o.ProcessSeqnum() cmd.exec.Execute(cmd.args) return nil }
func (trc *taskResCommand) Done(o *basic.Object) error { defer o.ProcessSeqnum() trc.t.n.Done(<-trc.t.r) return nil }