sp-hydra-veil-core/core/controllers/SystemStateController.py
2026-06-16 08:11:28 -05:00

29 lines
No EOL
592 B
Python

import os
import uuid
from core.models.system.SystemState import SystemState
class SystemStateController:
@staticmethod
def get():
return SystemState.get()
@staticmethod
def exists():
return SystemState.exists()
@staticmethod
def create(profile_id):
token = str(uuid.uuid4())
pid = os.getpid()
SystemState(profile_id, token, pid).save()
return token
@staticmethod
def update_or_create(system_state):
system_state.save()
@staticmethod
def dissolve():
return SystemState.dissolve()