From 8297076ff5d5ea08c72fb5e8d67c7c040c000009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petra=20C=CC=8Ci=CC=81halova=CC=81?= Date: Tue, 25 Jun 2024 13:42:08 +0200 Subject: [PATCH] add logs to catch exception occured during purge cache --- rbac/management/management/commands/seeds.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rbac/management/management/commands/seeds.py b/rbac/management/management/commands/seeds.py index 8c6dc9933..22326bc48 100644 --- a/rbac/management/management/commands/seeds.py +++ b/rbac/management/management/commands/seeds.py @@ -53,4 +53,8 @@ def handle(self, *args, **options): group_seeding() logger.info("*** Group seeding completed. ***\n") - purge_cache() + try: + purge_cache() + except Exception as e: + logger.error(f"An exception occurred during purge cache: {e}") + raise e