diff --git a/debian/control b/debian/control index 74dfa4a..9f180da 100644 --- a/debian/control +++ b/debian/control @@ -1,25 +1,29 @@ Source: swh-indexer Maintainer: Software Heritage developers Section: python Priority: optional Build-Depends: debhelper (>= 9), dh-python, python3-all, + python3-chardet (>= 2.3.0~), + python3-click, python3-nose, + python3-pygments, python3-setuptools, python3-swh.core (>= 0.0.27~), python3-swh.model (>= 0.0.15~), - python3-swh.storage (>= 0.0.85~), python3-swh.objstorage (>= 0.0.13~), - python3-swh.scheduler (>= 0.0.9~), - python3-chardet (>= 2.3.0~), - python3-click, - python3-pygments, + python3-swh.scheduler (>= 0.0.14~), + python3-swh.storage (>= 0.0.85~), python3-vcversioner Standards-Version: 3.9.6 Homepage: https://forge.softwareheritage.org/diffusion/78/ Package: python3-swh.indexer Architecture: all -Depends: universal-ctags (>= 0.8~), fossology-nomossa (>= 3.1~), ${misc:Depends}, ${python3:Depends} +Depends: fossology-nomossa (>= 3.1~), + python3-swh.scheduler (>= 0.0.14~), + universal-ctags (>= 0.8~), + ${misc:Depends}, + ${python3:Depends} Description: Software Heritage Content Indexer diff --git a/requirements-swh.txt b/requirements-swh.txt index 3423013..5f81ae8 100644 --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1,5 +1,5 @@ swh.core >= 0.0.27 swh.storage >= 0.0.85 swh.objstorage >= 0.0.13 -swh.scheduler >= 0.0.9 +swh.scheduler >= 0.0.14 swh.model >= 0.0.15 diff --git a/swh/indexer/tasks.py b/swh/indexer/tasks.py index 68f3e6a..deddd8b 100644 --- a/swh/indexer/tasks.py +++ b/swh/indexer/tasks.py @@ -1,90 +1,90 @@ # Copyright (C) 2016-2017 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 import logging from swh.scheduler.task import Task from .orchestrator import OrchestratorAllContentsIndexer from .orchestrator import OrchestratorTextContentsIndexer from .mimetype import ContentMimetypeIndexer from .language import ContentLanguageIndexer from .ctags import CtagsIndexer from .fossology_license import ContentFossologyLicenseIndexer from .rehash import RecomputeChecksums logging.basicConfig(level=logging.INFO) class SWHOrchestratorAllContentsTask(Task): """Main task in charge of reading batch contents (of any type) and broadcasting them back to other tasks. """ task_queue = 'swh_indexer_orchestrator_content_all' - def run(self, *args, **kwargs): + def run_task(self, *args, **kwargs): OrchestratorAllContentsIndexer().run(*args, **kwargs) class SWHOrchestratorTextContentsTask(Task): """Main task in charge of reading batch contents (of type text) and broadcasting them back to other tasks. """ task_queue = 'swh_indexer_orchestrator_content_text' - def run(self, *args, **kwargs): + def run_task(self, *args, **kwargs): OrchestratorTextContentsIndexer().run(*args, **kwargs) class SWHContentMimetypeTask(Task): """Task which computes the mimetype, encoding from the sha1's content. """ task_queue = 'swh_indexer_content_mimetype' - def run(self, *args, **kwargs): + def run_task(self, *args, **kwargs): ContentMimetypeIndexer().run(*args, **kwargs) class SWHContentLanguageTask(Task): """Task which computes the language from the sha1's content. """ task_queue = 'swh_indexer_content_language' - def run(self, *args, **kwargs): + def run_task(self, *args, **kwargs): ContentLanguageIndexer().run(*args, **kwargs) class SWHCtagsTask(Task): """Task which computes ctags from the sha1's content. """ task_queue = 'swh_indexer_content_ctags' - def run(self, *args, **kwargs): + def run_task(self, *args, **kwargs): CtagsIndexer().run(*args, **kwargs) class SWHContentFossologyLicenseTask(Task): """Task which computes licenses from the sha1's content. """ task_queue = 'swh_indexer_content_fossology_license' - def run(self, *args, **kwargs): + def run_task(self, *args, **kwargs): ContentFossologyLicenseIndexer().run(*args, **kwargs) class SWHRecomputeChecksumsTask(Task): """Task which recomputes hashes and possibly new ones. """ task_queue = 'swh_indexer_content_rehash' - def run(self, *args, **kwargs): + def run_task(self, *args, **kwargs): RecomputeChecksums().run(*args, **kwargs)