Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
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
Container 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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
c8e4965d
Verified
Commit
c8e4965d
authored
7 months ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
Use ProcessStatus enum values
parent
04353eb8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!239
Feature/send validation emails
Pipeline
#88151
passed
7 months ago
Stage: tox
Stage: documentation
Stage: sonarqube
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/services/subscriptions.py
+5
-2
5 additions, 2 deletions
gso/services/subscriptions.py
with
5 additions
and
2 deletions
gso/services/subscriptions.py
+
5
−
2
View file @
c8e4965d
...
...
@@ -19,6 +19,7 @@ from orchestrator.db import (
from
orchestrator.domain
import
SubscriptionModel
from
orchestrator.services.subscriptions
import
query_in_use_by_subscriptions
from
orchestrator.types
import
SubscriptionLifecycle
from
orchestrator.workflow
import
ProcessStatus
from
pydantic_forms.types
import
UUIDstr
from
gso.products
import
ProductName
,
ProductType
...
...
@@ -201,13 +202,15 @@ def count_incomplete_validate_products() -> int:
"""
return
ProcessTable
.
query
.
filter
(
ProcessTable
.
workflow_name
==
"
validate_geant_products
"
,
ProcessTable
.
last_status
!=
"
completed
"
,
ProcessTable
.
last_status
!=
ProcessStatus
.
COMPLETED
.
value
,
).
count
()
def
get_failed_tasks
()
->
list
[
ProcessTable
]:
"""
Get all tasks that have failed.
"""
return
ProcessTable
.
query
.
filter
(
ProcessTable
.
is_task
.
is_
(
True
),
ProcessTable
.
last_status
==
"
failed
"
).
all
()
return
ProcessTable
.
query
.
filter
(
ProcessTable
.
is_task
.
is_
(
True
),
ProcessTable
.
last_status
==
ProcessStatus
.
FAILED
.
value
).
all
()
def
get_subscription_by_process_id
(
process_id
:
str
)
->
SubscriptionModel
|
None
:
...
...
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