Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions taskiq/result_backends/dummy.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from logging import getLogger
from typing import Any, TypeVar

from taskiq.abc.result_backend import AsyncResultBackend
Expand All @@ -6,6 +7,9 @@
_ReturnType = TypeVar("_ReturnType")


logger = getLogger("taskiq")


class DummyResultBackend(AsyncResultBackend[_ReturnType]): # pragma: no cover
"""Default result backend, that does nothing."""

Expand Down Expand Up @@ -41,6 +45,8 @@ async def get_result(self, task_id: str, with_logs: bool = False) -> Any:
:param with_logs: wether to fetch logs.
:returns: TaskiqResult.
"""
logger.warning("No result backend configured. Returning dummy result...")

return TaskiqResult(
is_err=False,
log=None,
Expand Down