'Consume the queue items'

def run(self):

    while True:
        try:
            action = self.in_queue.get(timeout=self._timeout)
        except KeyboardInterrupt:
            continue
        except Queue.Empty:
            self._login()
        else:
            if (action == POISON_PILL):
                for plugin in self._consumer_plugins:
                    plugin.end()
                self.in_queue.task_done()
                break
            elif (action == FORCE_LOGIN):
                try:
                    self._login()
                finally:
                    self.in_queue.task_done()
