Page MenuHomeSoftware Heritage

D976.id3108.diff
No OneTemporary

D976.id3108.diff

diff --git a/swh/loader/pypi/tasks.py b/swh/loader/pypi/tasks.py
--- a/swh/loader/pypi/tasks.py
+++ b/swh/loader/pypi/tasks.py
@@ -3,17 +3,13 @@
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
-from swh.scheduler.task import Task
+from celery import current_app as app
from .loader import PyPILoader
-class LoadPyPI(Task):
- task_queue = 'swh_loader_pypi'
-
- def run_task(self, project_name, project_url, project_metadata_url=None):
- loader = PyPILoader()
- loader.log = self.log
- return loader.load(project_name,
- project_url,
- project_metadata_url=project_metadata_url)
+@app.task(name=__name__ + '.LoadPyPI')
+def load_pypi(project_name, project_url, project_metadata_url=None):
+ return PyPILoader().load(project_name,
+ project_url,
+ project_metadata_url=project_metadata_url)

File Metadata

Mime Type
text/plain
Expires
Nov 5 2024, 1:32 AM (8 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3226282

Event Timeline