diff --git a/classes/vesselthread.py b/classes/vesselthread.py index 9270230..633846c 100644 --- a/classes/vesselthread.py +++ b/classes/vesselthread.py @@ -5,9 +5,11 @@ from classes.vessel import Vessel import time + class VesselThread(Process): """Thread processing uploads to a single vessel """ + def __init__(self, vessel: Vessel, state: dict) -> None: """Initialize a new VesselThread @@ -25,7 +27,13 @@ class VesselThread(Process): print("Launched Vessel Thread for " + self.vessel.name) while True: try: - print(self._state["files"][0]) - except: - pass - time.sleep(1) \ No newline at end of file + self.processQueue() + except Exception as e: + print("An exception occurred in the Vessel Thread for " + + self.vessel.name) + print(repr(e)) + + def processQueue(self) -> None: + for f in self._state["files"]: + if not f.uuid in self.vessel._uploaded: + pass \ No newline at end of file