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
Jira
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
Merge requests
!280
add celery as EXECUTOR
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
add celery as EXECUTOR
feature/add-celery-executor
into
develop
Overview
2
Commits
2
Pipelines
2
Changes
4
All threads resolved!
Hide all comments
Merged
Mohammad Torkashvand
requested to merge
feature/add-celery-executor
into
develop
7 months ago
Overview
2
Commits
2
Pipelines
2
Changes
4
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Compare
develop
version 1
410b8de5
7 months ago
develop (base)
and
version 1
latest version
a86c5e6f
2 commits,
7 months ago
version 1
410b8de5
1 commit,
7 months ago
4 files
+
106
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
gso/__init__.py
+
17
−
0
Options
@@ -4,9 +4,12 @@ import os
import
sentry_sdk
import
typer
from
celery
import
Celery
from
orchestrator
import
OrchestratorCore
,
app_settings
from
orchestrator.cli.main
import
app
as
cli_app
from
orchestrator.graphql
import
SCALAR_OVERRIDES
from
orchestrator.services.tasks
import
initialise_celery
from
orchestrator.settings
import
ExecutorType
# noinspection PyUnresolvedReferences
import
gso.products
@@ -28,6 +31,20 @@ def init_gso_app() -> OrchestratorCore:
app
.
register_graphql_authorization
(
graphql_opa_instance
)
app
.
register_graphql
()
app
.
include_router
(
api_router
,
prefix
=
"
/api
"
)
if
app_settings
.
EXECUTOR
==
ExecutorType
.
WORKER
:
config
=
load_oss_params
()
celery
=
Celery
(
"
geant-service-orchestrator
"
,
broker
=
config
.
CELERY
.
broker_url
,
backend
=
config
.
CELERY
.
result_backend
,
include
=
[
"
orchestrator.services.tasks
"
],
)
celery
.
conf
.
update
(
result_expires
=
config
.
CELERY
.
result_expires
,
)
initialise_celery
(
celery
)
return
app
Loading