v1 server and lifecycle manager working. execution contract added

This commit is contained in:
Lyncoln
2026-10-08 09:31:29 -04:00
commit f4742f00e0
108 changed files with 750 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
from datetime import datetime
from core.operation.operation import buildOperation
def buildManager(definition):
operations = definition.operations
current_time = datetime.now().time()
for operation in operations:
if hasattr(operation, "role") and operation.role == "activate":
if definition.uptime <= current_time <= definition.downtime:
while True:
current_time = datetime.now().time()
outputs = buildOperation(operation)
if hasattr(operation, "role") and operation.role == "deactivate":
if definition.downtime <= current_time <= definition.uptime:
while True:
current_time = datetime.now().time()
outputs = buildOperation(operation)
# if hasattr(operation, "role") and role == offline:
# outputs = buildOperation(operation)