action = self.parse_body(body)
if self.uses_history:
self.total_history[body["to"]].append(body)
- ack = True
assert (action is None) or isinstance(action, Action)
except Exception as e:
# Don't crash the thread. No Exceptions.
- logger.exception("Ouch. {} crashed. Don't ack.".format(self.get_subclass_name()), exc_info=True)
- ack = False
+ logger.exception("Ouch. {} crashed.".format(self.get_subclass_name()), exc_info=True)
if not action:
logger.debug("no action taken")
else:
action.recipient = action.recipient or body["to"]
send_action(self.actionqueue, action)
- if ack:
- logger.debug("Done")
- ch.basic_ack(delivery_tag=method.delivery_tag)
+ ch.basic_ack(delivery_tag=method.delivery_tag)
def get_subclass_name(self):
return self.__class__.__name__