Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn if result backend is unset #430

Merged
merged 4 commits into from
Mar 24, 2025
Merged
Changes from all 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 @@
import warnings
from typing import Any, TypeVar

from taskiq.abc.result_backend import AsyncResultBackend
@@ -41,6 +42,11 @@ async def get_result(self, task_id: str, with_logs: bool = False) -> Any:
:param with_logs: wether to fetch logs.
:returns: TaskiqResult.
"""
warnings.warn(
"No result backend configured. Returning dummy result...",
stacklevel=2,
)

return TaskiqResult(
is_err=False,
log=None,