Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-deposit
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
Model registry
Operate
Environments
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
Platform
Development
swh-deposit
Commits
2c31d211
Verified
Commit
2c31d211
authored
5 years ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
Use @shared_task decorator instead of binding to specific celery app
parent
5dfbeac8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!40
Migrate most deposit tests to pytest
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swh/deposit/loader/tasks.py
+4
-4
4 additions, 4 deletions
swh/deposit/loader/tasks.py
with
4 additions
and
4 deletions
swh/deposit/loader/tasks.py
+
4
−
4
View file @
2c31d211
# Copyright (C) 2015-201
8
The Software Heritage developers
# Copyright (C) 2015-201
9
The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from
celery
import
current_app
as
app
from
celery
import
shared_task
from
swh.deposit.loader.loader
import
DepositLoader
from
swh.deposit.loader.checker
import
DepositChecker
@
app.
task
(
name
=
__name__
+
'
.LoadDepositArchiveTsk
'
)
@
shared_
task
(
name
=
__name__
+
'
.LoadDepositArchiveTsk
'
)
def
load_deposit_archive
(
archive_url
,
deposit_meta_url
,
deposit_update_url
):
"""
Deposit archive loading task described by the following steps:
...
...
@@ -27,7 +27,7 @@ def load_deposit_archive(archive_url, deposit_meta_url, deposit_update_url):
deposit_update_url
=
deposit_update_url
)
@
app.
task
(
name
=
__name__
+
'
.ChecksDepositTsk
'
)
@
shared_
task
(
name
=
__name__
+
'
.ChecksDepositTsk
'
)
def
check_deposit
(
deposit_check_url
):
"""
Check a deposit
'
s status
...
...
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