// Start begins processing DecisionTasks with the FSM. It creates a DecisionTaskPoller and spawns a goroutine that continues polling until Stop() is called and any in-flight polls have completed. // If you wish to manage polling and calling Tick() yourself, you dont need to start the FSM, just call Init(). func (f *FSM) Start() { f.Init() poller := poller.NewDecisionTaskPoller(f.SWF, f.Domain, f.Identity, f.TaskList) go poller.PollUntilShutdownBy(f.ShutdownManager, fmt.Sprintf("%s-poller", f.Name), f.dispatchTask, f.taskReady) }
func (a *ActivityWorker) Start() { a.Init() poller := poller.NewActivityTaskPoller(a.SWF, a.Domain, a.Identity, a.TaskList) go poller.PollUntilShutdownBy(a.ShutdownManager, fmt.Sprintf("%s-poller", a.Identity), a.dispatchTask) }