Scheduler first commit
This commit is contained in:
parent
70c53a9aef
commit
2c64ebda67
24 changed files with 880 additions and 0 deletions
8
examples/schedule/schedule_lib/id_generator.py
Normal file
8
examples/schedule/schedule_lib/id_generator.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
from .singleton import Singleton
|
||||
|
||||
class IdGenerator(metaclass=Singleton):
|
||||
def __init__(self):
|
||||
self.id = -1
|
||||
def generate_id(self) -> int:
|
||||
self.id += 1
|
||||
return self.id
|
||||
Loading…
Add table
Add a link
Reference in a new issue