From 4185609289200bfbaff8d1fbb7f564991366689c Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Thu, 25 Nov 2021 17:21:04 +0100 Subject: [PATCH] A few more lines in VesselThread --- classes/vesselthread.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/classes/vesselthread.py b/classes/vesselthread.py index 633846c..0e6d294 100644 --- a/classes/vesselthread.py +++ b/classes/vesselthread.py @@ -27,13 +27,23 @@ class VesselThread(Process): print("Launched Vessel Thread for " + self.vessel.name) while True: try: - self.processQueue() + self.upload() except Exception as e: print("An exception occurred in the Vessel Thread for " + self.vessel.name) print(repr(e)) + def upload(self) -> None: + """Continue uploading process + """ + if not (current := self.vessel.currentUpload): + self.processQueue() + return + pass + def processQueue(self) -> None: + """Start uploading a file from the processing queue + """ for f in self._state["files"]: if not f.uuid in self.vessel._uploaded: pass \ No newline at end of file