mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 06:12:19 +01:00
Base of worker
This commit is contained in:
parent
663d2bf8d3
commit
d7f5797bae
1 changed files with 14 additions and 0 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue