예제 #1
0
    def create_tracker(self, sender_id):
        """Creates a new tracker for the sender.

        The tracker is initially listening."""

        tracker = self._init_tracker(sender_id)
        tracker.update(ActionExecuted(ACTION_LISTEN_NAME))
        self.save(tracker)
        return tracker
예제 #2
0
    def create_tracker(self, sender_id, append_action_listen=True):
        """Creates a new tracker for the sender_id.

        The tracker is initially listening."""

        tracker = self.init_tracker(sender_id)
        if append_action_listen:
            tracker.update(ActionExecuted(ACTION_LISTEN_NAME))
        self.save(tracker)
        return tracker