(self, queue)
responsible for reading actions given to this connection
responsible for reading actions given to this connection
responsible for reading actions given to this connection
def consume_actions(self, queue):
        """
        responsible for reading actions given to this connection
        """
        def consumer(action):
            if isinstance(action, Action):
                self.handle_action(action)
            else:
                self.log.warning('invalid action put in queue: {0!r}'.format(action))

            queue.get().addCallback(consumer)
        queue.get().addCallback(consumer)
def consume_actions ( self , queue ) : def consumer ( action ) : if isinstance ( action , Action ) : self . handle_action ( action ) else : self . log . warning ( 'invalid action put in queue: {0!r}' . format ( action ) ) queue . get ( ) . addCallback ( consumer ) queue . get ( ) . addCallback ( consumer )