Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/debian/lister.py
Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | class DebianLister(ListerHttpTransport, ListerBase): | ||||
def create_tasks_for_snapshot(self, snapshot): | def create_tasks_for_snapshot(self, snapshot): | ||||
tasks = [ | tasks = [ | ||||
snapshot.task_for_package(name, versions) | snapshot.task_for_package(name, versions) | ||||
for name, versions in snapshot.get_packages().items() | for name, versions in snapshot.get_packages().items() | ||||
] | ] | ||||
return self.scheduler.create_tasks(tasks) | return self.scheduler.create_tasks(tasks) | ||||
def run(self, distribution, date=None): | def run(self, distribution='Debian', date=None): | ||||
"""Run the lister for a given (distribution, area) tuple. | """Run the lister for a given (distribution, area) tuple. | ||||
Args: | Args: | ||||
distribution (str): name of the distribution (e.g. "Debian") | distribution (str): name of the distribution (e.g. "Debian") | ||||
date (datetime.datetime): date the snapshot is taken (defaults to | date (datetime.datetime): date the snapshot is taken (defaults to | ||||
now) | now) | ||||
""" | """ | ||||
distribution = self.db_session\ | distribution = self.db_session\ | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |