Base of worker

This commit is contained in:
iLLiCiTiT 2021-10-08 18:43:29 +02:00
parent 663d2bf8d3
commit d7f5797bae

View file

@ -0,0 +1,14 @@
from uuid import uuid4
class Worker:
"""Worker that can handle jobs of specific host."""
def __init__(self, host_name):
self._id = None
self.host_name = host_name
@property
def id(self):
if self._id is None:
self._id = str(uuid4())
return self._id