Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
faust-streaming / faust / fixups / base.py
Size: Mime:
"""Fixups - Base implementation."""
from typing import Iterable

from faust.types import AppT, FixupT

__all__ = ["Fixup"]


class Fixup(FixupT):
    """Base class for fixups.

    Fixups are things that hook into Faust to make things
    work for other frameworks, such as Django.
    """

    def __init__(self, app: AppT) -> None:
        self.app = app

    def enabled(self) -> bool:
        """Return if fixup should be enabled in this environment."""
        return False

    def autodiscover_modules(self) -> Iterable[str]:
        """Return list of additional autodiscover modules."""
        return []

    def on_worker_init(self) -> None:
        """Call when initializing worker/CLI commands."""
        ...