@@ -0,0 +1,1518 @@
+#! -*- coding: utf-8 -*-%0A%0Afrom swf.models.event import History%0Afrom swf.actors.core import Actor%0A%0A%0Aclass Decider(Actor):%0A    %22%22%22Decider actor implementation%0A%0A    :param  domain: Domain the Actor should interact with%0A    :type   domain: swf.models.Domain%0A%0A    :param  task_list: task list the Actor should watch for tasks on%0A    :type   task_list: string%0A%0A    :param  last_token: last seen task token%0A    :type   last_token: string%0A    %22%22%22%0A    def __init__(self, domain, task_list, last_token=None):%0A        super(Decider, self).__init__(%0A            domain,%0A            task_list,%0A            last_token%0A        )%0A%0A    def complete(self, task_token=None, decisions=None, **kwargs):%0A        %22%22%22Responds to %60%60swf%60%60 a decision has been made%0A%0A        :param  task_token: completed decision task token%0A        :type   task_token: string%0A%0A        :param  decisions: The list of decisions (possibly empty)%0A                           made by the decider while processing this decision task%0A        :type   decisions: list%0A        %22%22%22%0A        pass%0A%0A    def poll(self, **kwargs):%0A        %22%22%22Polls for decision tasks to process from current%0A        actor's instance defined %60%60task_list%60%60%0A%0A        :returns: polled decision tasks%0A        :type: swf.models.History%0A        %22%22%22%0A        events = self.connection.poll_for_decision_task(%0A            self.domain.name,%0A            self.task_list%0A        )%0A%0A        history = History.from_event_list(events%5B'events'%5D)%0A        self.task_token = events%5B'taskToken'%5D%0A%0A        return history

implement decider base actor