From 458a9e6733d65c405a9f884a833e80475356c82e Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Mon, 30 Oct 2017 14:19:43 +0100 Subject: [PATCH] Add a new DebianListerTask --- swh/lister/debian/lister.py | 2 ++ swh/lister/debian/tasks.py | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 swh/lister/debian/tasks.py diff --git a/swh/lister/debian/lister.py b/swh/lister/debian/lister.py index db61aec..913971b 100644 --- a/swh/lister/debian/lister.py +++ b/swh/lister/debian/lister.py @@ -232,3 +232,5 @@ class DebianLister(SWHListerHttpTransport, SWHListerBase): self.create_tasks_for_snapshot(snapshot) self.db_session.commit() + + return True diff --git a/swh/lister/debian/tasks.py b/swh/lister/debian/tasks.py new file mode 100644 index 0000000..39aa6a2 --- /dev/null +++ b/swh/lister/debian/tasks.py @@ -0,0 +1,16 @@ +# Copyright (C) 2017 the Software Heritage developers +# License: GNU General Public License version 3, or any later version +# See top-level LICENSE file for more information + +from swh.lister.core.tasks import ListerTaskBase + +from .lister import DebianLister + + +class DebianListerTask(ListerTaskBase): + def new_lister(self): + return DebianLister() + + def run_task(self, distribution): + lister = self.new_lister() + return lister.run(distribution)