This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/staging by this push:
new 15f91433 AIRAVATA-3694 log exception when archive fails so it
generates an error email in production
15f91433 is described below
commit 15f91433b519f096f0c29869d9b3e9ba2c33c505
Author: Marcus Christie <[email protected]>
AuthorDate: Tue Apr 25 16:35:08 2023 -0400
AIRAVATA-3694 log exception when archive fails so it generates an error
email in production
---
django_airavata/apps/admin/management/commands/archive_user_data.py | 1 +
1 file changed, 1 insertion(+)
diff --git
a/django_airavata/apps/admin/management/commands/archive_user_data.py
b/django_airavata/apps/admin/management/commands/archive_user_data.py
index f71de1f8..a79b1bcc 100644
--- a/django_airavata/apps/admin/management/commands/archive_user_data.py
+++ b/django_airavata/apps/admin/management/commands/archive_user_data.py
@@ -112,6 +112,7 @@ class Command(BaseCommand):
self.stdout.write(self.style.ERROR("Failed while deleting
archived data, attempting to roll back"))
with tarfile.open(archive_directory /
archive_tarball_filename) as tf:
tf.extractall(path="/")
+ logger.exception(f"[archive_user_data] Failed to delete
archived files, but unarchived from tarball {archive_directory /
archive_tarball_filename}", exc_info=e)
raise CommandError(f"Failed to delete archived files, but
unarchived from tarball {archive_directory / archive_tarball_filename}") from e
self.stdout.write(self.style.SUCCESS("Successfully removed
archived user data"))