Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/core/tasks.py
# Copyright (C) 2017-2018 the Software Heritage developers | # Copyright (C) 2017-2018 the Software Heritage developers | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import abc | import abc | ||||
import random | import random | ||||
from celery import group | from celery import group | ||||
from swh.scheduler.task import Task, TaskType | from swh.scheduler.task import Task | ||||
from .abstractattribute import AbstractAttribute | from .abstractattribute import AbstractAttribute | ||||
class AbstractTaskMeta(abc.ABCMeta, TaskType): | class AbstractTaskMeta(abc.ABCMeta): | ||||
pass | pass | ||||
class ListerTaskBase(Task, metaclass=AbstractTaskMeta): | class ListerTaskBase(Task, metaclass=AbstractTaskMeta): | ||||
"""Lister Tasks define the process of periodically requesting batches of | """Lister Tasks define the process of periodically requesting batches of | ||||
repository information from source code hosting services. They | repository information from source code hosting services. They | ||||
instantiate Listers to do batches of work at periodic intervals. | instantiate Listers to do batches of work at periodic intervals. | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |