diff options
author | Jaime van Kessel <nallath@gmail.com> | 2021-08-19 11:01:01 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2021-08-19 11:01:01 +0300 |
commit | 668624e13ddd41afc9e59f3e7c03047f7688dbd7 (patch) | |
tree | b18a82e6def851202c9f03906bb87f5d5f7796ca | |
parent | 1c9b3a07841847ea1b5668a902a095f4fad4f9d2 (diff) |
Set lifetimes correctly
-rw-r--r-- | plugins/DigitalLibrary/src/DFFileExportAndUploadManager.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/plugins/DigitalLibrary/src/DFFileExportAndUploadManager.py b/plugins/DigitalLibrary/src/DFFileExportAndUploadManager.py index ac753f47bf..a5560f32a8 100644 --- a/plugins/DigitalLibrary/src/DFFileExportAndUploadManager.py +++ b/plugins/DigitalLibrary/src/DFFileExportAndUploadManager.py @@ -73,6 +73,7 @@ class DFFileExportAndUploadManager: self._generic_success_message = getBackwardsCompatibleMessage( text = "Your {} uploaded to '{}'.".format("file was" if len(self._file_upload_job_metadata) <= 1 else "files were", self._library_project_name), title = "Upload successful", + lifetime = 30, message_type_str = "POSITIVE" ) self._generic_success_message.addAction( @@ -221,7 +222,7 @@ class DFFileExportAndUploadManager: text = "Failed to export the file '{}'. The upload process is aborted.".format(filename), title = "Export error", message_type_str = "ERROR", - lifetime = 0 + lifetime = 30 ) self._on_upload_error() self._onFileUploadFinished(filename) @@ -244,7 +245,7 @@ class DFFileExportAndUploadManager: text = "Failed to upload the file '{}' to '{}'. {}".format(filename_3mf, self._library_project_name, human_readable_error), title = "File upload error", message_type_str = "ERROR", - lifetime = 0 + lifetime = 30 ) self._on_upload_error() self._onFileUploadFinished(filename_3mf) @@ -267,7 +268,7 @@ class DFFileExportAndUploadManager: title = "File upload error", text = "Failed to upload the file '{}' to '{}'. {}".format(filename_ufp, self._library_project_name, human_readable_error), message_type_str = "ERROR", - lifetime = 0 + lifetime = 30 ) self._on_upload_error() self._onFileUploadFinished(filename_ufp) @@ -304,7 +305,7 @@ class DFFileExportAndUploadManager: title = "File upload error", text = "Failed to upload the file '{}' to '{}'. {}".format(self._file_name, self._library_project_name, human_readable_error), message_type_str = "ERROR", - lifetime = 0 + lifetime = 30 ) self._on_upload_error() @@ -340,13 +341,14 @@ class DFFileExportAndUploadManager: "file_upload_success_message": getBackwardsCompatibleMessage( text = "'{}' was uploaded to '{}'.".format(filename_3mf, self._library_project_name), title = "Upload successful", - message_type_str = "POSITIVE" + message_type_str = "POSITIVE", + lifetime = 30 ), "file_upload_failed_message": getBackwardsCompatibleMessage( text = "Failed to upload the file '{}' to '{}'.".format(filename_3mf, self._library_project_name), title = "File upload error", message_type_str = "ERROR", - lifetime = 0 + lifetime = 30 ) } job_3mf = ExportFileJob(self._file_handlers["3mf"], self._nodes, self._file_name, "3mf") @@ -363,13 +365,14 @@ class DFFileExportAndUploadManager: "file_upload_success_message": getBackwardsCompatibleMessage( text = "'{}' was uploaded to '{}'.".format(filename_ufp, self._library_project_name), title = "Upload successful", - message_type_str = "POSITIVE" + message_type_str = "POSITIVE", + lifetime = 30, ), "file_upload_failed_message": getBackwardsCompatibleMessage( text = "Failed to upload the file '{}' to '{}'.".format(filename_ufp, self._library_project_name), title = "File upload error", message_type_str = "ERROR", - lifetime = 0 + lifetime = 30 ) } job_ufp = ExportFileJob(self._file_handlers["ufp"], self._nodes, self._file_name, "ufp") |