Revert "*: use cache.delete_pattern instead of getting keys and deleting them"
This reverts commit ff481ba6e7
.
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
# Conflicts:
# authentik/flows/views/executor.py
# authentik/policies/signals.py
This commit is contained in:
@ -205,7 +205,8 @@ class FlowExecutorView(APIView):
|
||||
self._logger.warning(
|
||||
"f(exec): found incompatible flow plan, invalidating run", exc=exc
|
||||
)
|
||||
cache.delete_pattern("flow_*")
|
||||
keys = cache.keys("flow_*")
|
||||
cache.delete_many(keys)
|
||||
return self.stage_invalid()
|
||||
if not next_binding:
|
||||
self._logger.debug("f(exec): no more stages, flow is done.")
|
||||
@ -331,7 +332,8 @@ class FlowExecutorView(APIView):
|
||||
# from the cache. If there are errors, just delete all cached flows
|
||||
_ = plan.has_stages
|
||||
except Exception: # pylint: disable=broad-except
|
||||
cache.delete_pattern("flow_*")
|
||||
keys = cache.keys("flow_*")
|
||||
cache.delete_many(keys)
|
||||
return self._initiate_plan()
|
||||
return plan
|
||||
|
||||
|
Reference in New Issue
Block a user