contentmonster/classes/vesselthread.py

18 lines
439 B
Python
Raw Normal View History

2021-11-20 14:40:07 +00:00
from multiprocessing import Process
2021-11-22 10:14:38 +00:00
import time
2021-11-20 14:40:07 +00:00
class VesselThread(Process):
def __init__(self, vessel, files):
super().__init__()
self.vessel = vessel
2021-11-22 10:14:38 +00:00
self.files = files
2021-11-20 14:40:07 +00:00
def run(self):
2021-11-22 10:14:38 +00:00
print("Launched Vessel Thread for " + self.vessel.name)
while True:
try:
print(self.files[0])
except:
print("Nothing.")
time.sleep(10)