Skip to content

Commit 1a55273

Browse files
use warn from warnings module
1 parent 7bc85e3 commit 1a55273

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

taskiq/result_backends/dummy.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from logging import getLogger
1+
import warnings
22
from typing import Any, TypeVar
33

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

99

10-
logger = getLogger("taskiq")
11-
12-
1310
class DummyResultBackend(AsyncResultBackend[_ReturnType]): # pragma: no cover
1411
"""Default result backend, that does nothing."""
1512

@@ -45,7 +42,10 @@ async def get_result(self, task_id: str, with_logs: bool = False) -> Any:
4542
:param with_logs: wether to fetch logs.
4643
:returns: TaskiqResult.
4744
"""
48-
logger.warning("No result backend configured. Returning dummy result...")
45+
warnings.warn(
46+
"No result backend configured. Returning dummy result...",
47+
stacklevel=2,
48+
)
4949

5050
return TaskiqResult(
5151
is_err=False,

0 commit comments

Comments
 (0)