Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
86b8c62f
Commit
86b8c62f
authored
4 years ago
by
Nathan Hertz
Browse files
Options
Downloads
Patches
Plain Diff
Added enums for representing state of CapabilityRequests and
CapabilityExecutions
parent
9a64366f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
shared/workspaces/src/workspaces/capability_interfaces.py
+23
-1
23 additions, 1 deletion
shared/workspaces/src/workspaces/capability_interfaces.py
with
23 additions
and
1 deletion
shared/workspaces/src/workspaces/capability_interfaces.py
+
23
−
1
View file @
86b8c62f
...
...
@@ -116,7 +116,7 @@ class CapabilityQueueIF(ABC):
the number of concurrent executions or pause execution altogether
"""
@abstractmethod
def
enqueue
(
self
,
execution
:
Capability
Execution
):
def
enqueue
(
self
,
request
:
Capability
Request
,
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment