File: checks.py

package info (click to toggle)
python-django-tasks 0.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 256 kB
  • sloc: python: 1,703; sh: 5; makefile: 4
file content (17 lines) | stat: -rw-r--r-- 437 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from collections.abc import Iterable, Sequence
from typing import Any

from django.apps.config import AppConfig
from django.core import checks

from django_tasks import task_backends


@checks.register
def check_tasks(
    app_configs: Sequence[AppConfig] = None, **kwargs: Any
) -> Iterable[checks.CheckMessage]:
    """Checks all registered task backends."""

    for backend in task_backends.all():
        yield from backend.check()