Moving authentication check outside of the loop in fire()
@@ -504,7 +504,6 @@ class Actor(object):
def fire(self):
start_time = time.time()
total_result = ActionResult(did_fire=False)
- while True:
if not self.check_authorization_decision():
_log.info("Access denied for actor %s(%s)" % ( self._type, self._id))
# The authorization decision is not valid anymore.
@@ -513,6 +512,7 @@ class Actor(object):
# Try to migrate actor.
self.sec.authorization_runtime_search(self._id, self._signature, callback=CalvinCB(self.set_migration_info))
return total_result
+ while True:
# Re-try action in list order after EVERY firing
for action_method in self.__class__.action_priority:
action_result = action_method(self)
