Skip to content
Snippets Groups Projects
Commit 86b8c62f authored by Nathan Hertz's avatar Nathan Hertz
Browse files

Added enums for representing state of CapabilityRequests and

CapabilityExecutions
parent 9a64366f
No related branches found
No related tags found
No related merge requests found
......@@ -116,7 +116,7 @@ class CapabilityQueueIF(ABC):
the number of concurrent executions or pause execution altogether
"""
@abstractmethod
def enqueue(self, execution: CapabilityExecution):
def enqueue(self, request: CapabilityRequest, priority: int):
raise NotImplementedError(f'{self.__class__.__name__}.{inspect.stack()[0][3]}')
@abstractmethod
......@@ -149,6 +149,7 @@ class CapabilityServiceIF(ABC):
"""
raise NotImplementedError
class EstimationServiceIF(ABC):
"""
Service that estimates how long a capability will take to complete
......@@ -249,3 +250,24 @@ class CapabilityStepType(Enum):
AwaitProduct = auto()
AwaitParameter = auto()
AwaitLargeAllocApproval = auto()
class RequestState(Enum):
"""
Enum that specifies the states that a capability request can be in
"""
Complete = 0
Executing = 1
Ready = 2
Cancelled = 3
class ExecutionState(Enum):
"""
Enum that specifies the states that a capability execution can find itself in
"""
Complete = 0
ExecutingStep = 1
Ready = 2
Cancelled = 3
Failed = -1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment