Some work on VesselThread

This commit is contained in:
Kumi 2021-11-25 17:09:40 +01:00
parent 7cfcc99909
commit b6eb599dd0

View file

@ -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)
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