Skip to content

Commit

Permalink
Merge pull request RedHatInsights#1131 from petracihalova/seeds_debug…
Browse files Browse the repository at this point in the history
…_logs

temporary logs for debugging the purge_cache() issue
  • Loading branch information
petracihalova authored Jun 27, 2024
2 parents a006dd5 + 46e5301 commit 8fcc495
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions rbac/management/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,20 @@ def delete_all_policies_for_tenant(self):
err_msg = f"Error deleting all policies for tenant {self.tenant}"
with self.delete_handler(err_msg):
logger.info("Deleting entire policy cache for tenant %s", self.tenant)
keys = self.connection.keys(self.key_for("*"))
logger.info(f"Content of 'keys' variable: {keys}")
try:
key = self.key_for("*")
logger.info("value of key", key)
except Exception as e:
logger.error('error from key = self.key_for("*")', e)
raise e

try:
keys = self.connection.keys(key)
logger.info(f"Content of 'keys' variable: {keys}")
except Exception as e:
logger.error("error from keys = self.connection.keys(key)", e)
raise e

if keys:
try:
self.connection.delete(*keys)
Expand Down

0 comments on commit 8fcc495

Please sign in to comment.