Add a new DebianListerTask
This commit is contained in:
parent
6b2863f125
commit
458a9e6733
2 changed files with 18 additions and 0 deletions
|
@ -232,3 +232,5 @@ class DebianLister(SWHListerHttpTransport, SWHListerBase):
|
|||
self.create_tasks_for_snapshot(snapshot)
|
||||
|
||||
self.db_session.commit()
|
||||
|
||||
return True
|
||||
|
|
16
swh/lister/debian/tasks.py
Normal file
16
swh/lister/debian/tasks.py
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue