Changeset View
Changeset View
Standalone View
Standalone View
swh/scheduler/celery_backend/pika_listener.py
# Copyright (C) 2020 The Software Heritage developers | # Copyright (C) 2020-2021 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# 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 | ||||
"""This is the scheduler listener. It is in charge of listening to rabbitmq events (the | |||||
task result) and flushes the "oneshot" tasks' status in the scheduler backend. It's the | |||||
final step after a task is done. | |||||
anlambert: It's the final step executed after a task is done. => to avoid the done repetition | |||||
Done Inline Actionslol, indeed, thx ;) ardumont: lol, indeed, thx ;) | |||||
The scheduler runner :mod:`swh.scheduler.celery_backend.runner` is the module in charge | |||||
of pushing tasks in the queue. | |||||
""" | |||||
import json | import json | ||||
import logging | import logging | ||||
import sys | import sys | ||||
import pika | import pika | ||||
from swh.core.statsd import statsd | from swh.core.statsd import statsd | ||||
from swh.scheduler import get_scheduler | from swh.scheduler import get_scheduler | ||||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |
It's the final step executed after a task is done. => to avoid the done repetition