def fire_actors(self): total = ActionResult(did_fire=False) with traceback_context(): for actor in self.actor_mgr.enabled_actors(): try: action_result = actor.fire() total.merge(action_result) except: _log.error('\n'.join(format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))) self.idle = not total.did_fire
def fire_actors(self, actor_ids=None): total = ActionResult(did_fire=False) total.actor_ids = set() for actor in self.actor_mgr.enabled_actors(): # if actor_ids is not None and actor.id not in actor_ids: # _log.debug("ignoring actor %s(%s)" % (actor._type, actor.id)) # continue try: action_result = actor.fire() _log.debug("fired actor %s(%s)" % (actor._type, actor.id)) total.merge(action_result) total.actor_ids.add(actor.id) except Exception as e: self._log_exception_during_fire(e) self.idle = not total.did_fire return total
def fire_actors(self, actor_ids=None): total = ActionResult(did_fire=False) total.actor_ids = set() for actor in self.actor_mgr.enabled_actors(): # if actor_ids is not None and actor.id not in actor_ids: # _log.debug("ignoring actor %s(%s)" % (actor._type, actor.id)) # continue try: action_result = actor.fire() _log.debug("fired actor %s(%s)" % (actor._type, actor.id)) total.merge(action_result) total.actor_ids.add(actor.id) except FifoFullException as e: _log.error(e) pass except Exception as e: self._log_exception_during_fire(e) _log.error("Actor {} threw exception: {}. Replicing actor with new replica.".format(actor.id, e)) #self.actor_mgr.replicate(actor.id, self.node.id) #self.actor_mgr.delete_actor(actor.id, delete_from_app=True) self.idle = not total.did_fire return total