Add a new DebianListerTask

This commit is contained in:
Nicolas Dandrimont 2017-10-30 14:19:43 +01:00
parent 6b2863f125
commit 458a9e6733
2 changed files with 18 additions and 0 deletions

View file

@ -232,3 +232,5 @@ class DebianLister(SWHListerHttpTransport, SWHListerBase):
self.create_tasks_for_snapshot(snapshot)
self.db_session.commit()
return True

View file

@ -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)