diff --git a/swh/loader/mercurial/tasks.py b/swh/loader/mercurial/tasks.py index 11ea571..8162a3c 100644 --- a/swh/loader/mercurial/tasks.py +++ b/swh/loader/mercurial/tasks.py @@ -1,43 +1,43 @@ -# Copyright (C) 2017 The Software Heritage developers +# Copyright (C) 2017-2018 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.scheduler.task import Task from .bundle20_loader import HgBundle20Loader, HgArchiveBundle20Loader class LoadMercurialTsk(Task): """Mercurial repository loading """ task_queue = 'swh_loader_mercurial' def run_task(self, *, origin_url, visit_date, directory): """Import a mercurial tarball into swh. Args: see :func:`DepositLoader.load`. """ loader = HgBundle20Loader() loader.log = self.log - loader.load(origin_url=origin_url, - directory=directory, - visit_date=visit_date) + return loader.load(origin_url=origin_url, + directory=directory, + visit_date=visit_date) class LoadArchiveMercurialTsk(Task): task_queue = 'swh_loader_mercurial_archive' def run_task(self, *, origin_url, archive_path, visit_date): """Import a mercurial tarball into swh. Args: see :func:`DepositLoader.load`. """ loader = HgArchiveBundle20Loader() loader.log = self.log - loader.load(origin_url=origin_url, - archive_path=archive_path, - visit_date=visit_date) + return loader.load(origin_url=origin_url, + archive_path=archive_path, + visit_date=visit_date)