diff --git a/debian/control b/debian/control index 29b7a48..4a13aab 100644 --- a/debian/control +++ b/debian/control @@ -1,24 +1,25 @@ Source: swh-loader-dir Maintainer: Software Heritage developers Section: python Priority: optional Build-Depends: debhelper (>= 9), dh-python, python3-all, python3-nose, python3-setuptools, python3-swh.core (>= 0.0.14), python3-swh.model (>= 0.0.3), + python3-swh.scheduler, python3-swh.storage (>= 0.0.31), python3-vcversioner Standards-Version: 3.9.6 Homepage: https://forge.softwareheritage.org/diffusion/DLDDIR/ Package: python3-swh.loader.dir Architecture: all Depends: python3-swh.core (>= 0.0.14), python3-swh.model (>= 0.0.3), python3-swh.storage (>= 0.0.31), ${misc:Depends}, ${python3:Depends} Description: Software Heritage Directory Loader diff --git a/requirements.txt b/requirements.txt index affcb33..92631f8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,9 @@ # Add here external Python modules dependencies, one per line. Module names # should match https://pypi.python.org/pypi names. For the full spec or # dependency lines, see https://pip.readthedocs.org/en/1.1/requirements.html vcversioner swh.core >= 0.0.14 swh.model >= 0.0.3 +swh.scheduler swh.storage >= 0.0.31 retrying diff --git a/swh/loader/dir/tasks.py b/swh/loader/dir/tasks.py index 37f02cb..7f46076 100644 --- a/swh/loader/dir/tasks.py +++ b/swh/loader/dir/tasks.py @@ -1,35 +1,35 @@ # Copyright (C) 2015 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 swh.core.scheduling import Task +from swh.scheduler.task import Task from swh.loader.dir.loader import DirLoaderWithHistory class LoadDirRepository(Task): """Import a directory to Software Heritage """ task_queue = 'swh_loader_dir' CONFIG_BASE_FILENAME = 'loader/dir.ini' ADDITIONAL_CONFIG = {} def __init__(self): self.config = DirLoaderWithHistory.parse_config_file( base_filename=self.CONFIG_BASE_FILENAME, additional_configs=[self.ADDITIONAL_CONFIG], ) def run(self, dir_path, origin, revision, release, occurrences): """Import a directory. Args: cf. swh.loader.dir.loader.run docstring """ loader = DirLoaderWithHistory(self.config) loader.log = self.log loader.process(dir_path, origin, revision, release, occurrences)