Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pypelines
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
HaissLab
Data Management
Pypelines
Commits
9303d344
Commit
9303d344
authored
1 year ago
by
Timothe Jost
Browse files
Options
Downloads
Patches
Plain Diff
little change to revert the ability to run create_celery_app without raising exceptions if it fails
parent
a6c8c424
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#127804
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pypelines/__init__.py
+1
-1
1 addition, 1 deletion
src/pypelines/__init__.py
src/pypelines/celery_tasks.py
+19
-13
19 additions, 13 deletions
src/pypelines/celery_tasks.py
with
20 additions
and
14 deletions
src/pypelines/__init__.py
+
1
−
1
View file @
9303d344
__version__
=
"
0.0.4
8
"
__version__
=
"
0.0.4
9
"
from
.
import
loggs
from
.
import
loggs
from
.pipes
import
*
from
.pipes
import
*
...
...
This diff is collapsed.
Click to expand it.
src/pypelines/celery_tasks.py
+
19
−
13
View file @
9303d344
...
@@ -316,8 +316,26 @@ class LogTask:
...
@@ -316,8 +316,26 @@ class LogTask:
def
create_celery_app
(
conf_path
,
app_name
=
"
pypelines
"
,
v_host
=
None
)
->
"
Celery | None
"
:
def
create_celery_app
(
conf_path
,
app_name
=
"
pypelines
"
,
v_host
=
None
)
->
"
Celery | None
"
:
failure_message
=
(
f
"
Celery app :
{
app_name
}
failed to be created.
"
"
Don
'
t worry, about this alert,
"
"
this is not be an issue if you didn
'
t explicitely planned on using celery. Issue was :
"
)
logger
=
getLogger
(
"
pypelines.create_celery_app
"
)
if
app_name
in
APPLICATIONS_STORE
.
keys
():
logger
.
warning
(
f
"
Tried to create a celery app named
{
app_name
}
, but it already exists. Returning it instead.
"
)
return
APPLICATIONS_STORE
[
app_name
]
try
:
from
celery
import
Task
except
ImportError
as
e
:
logger
.
warning
(
f
"
{
failure_message
}
Could not import celery app.
{
e
}
"
)
return
None
from
types
import
MethodType
from
types
import
MethodType
from
celery
import
Task
def
get_setting_files_path
(
conf_path
)
->
List
[
Path
]:
def
get_setting_files_path
(
conf_path
)
->
List
[
Path
]:
conf_path
=
Path
(
conf_path
)
conf_path
=
Path
(
conf_path
)
...
@@ -480,18 +498,6 @@ def create_celery_app(conf_path, app_name="pypelines", v_host=None) -> "Celery |
...
@@ -480,18 +498,6 @@ def create_celery_app(conf_path, app_name="pypelines", v_host=None) -> "Celery |
)
)
return
task_record
return
task_record
failure_message
=
(
f
"
Celery app :
{
app_name
}
failed to be created.
"
"
Don
'
t worry, about this alert,
"
"
this is not be an issue if you didn
'
t explicitely planned on using celery. Issue was :
"
)
logger
=
getLogger
(
"
pypelines.create_celery_app
"
)
if
app_name
in
APPLICATIONS_STORE
.
keys
():
logger
.
warning
(
f
"
Tried to create a celery app named
{
app_name
}
, but it already exists. Returning it instead.
"
)
return
APPLICATIONS_STORE
[
app_name
]
settings_files
=
get_setting_files_path
(
conf_path
)
settings_files
=
get_setting_files_path
(
conf_path
)
if
len
(
settings_files
)
==
0
:
if
len
(
settings_files
)
==
0
:
...
...
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