File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929from taskiq .result_backends .dummy import DummyResultBackend
3030from taskiq .serializers .json_serializer import JSONSerializer
3131from taskiq .state import TaskiqState
32- from taskiq .utils import maybe_awaitable , remove_suffix
32+ from taskiq .utils import maybe_awaitable
3333from taskiq .warnings import TaskiqDeprecationWarning
3434
3535if sys .version_info >= (3 , 11 ):
@@ -317,10 +317,9 @@ def inner(
317317 fmodule = func .__module__
318318 if fmodule == "__main__" : # pragma: no cover
319319 fmodule = "." .join (
320- remove_suffix (
321- os .path .normpath (sys .argv [0 ]),
322- ".py" ,
323- ).split (os .path .sep ),
320+ os .path .normpath (sys .argv [0 ])
321+ .removesuffix (".py" )
322+ .split (os .path .sep ),
324323 )
325324 fname = func .__name__
326325 if fname == "<lambda>" :
Original file line number Diff line number Diff line change @@ -48,11 +48,12 @@ async def get_schedules(source: ScheduleSource) -> list[ScheduledTask]:
4848 try :
4949 return await source .get_schedules ()
5050 except Exception as exc :
51- logger .warning (
52- "Cannot update schedules with source: %s" ,
51+ logger .error (
52+ "Cannot update schedules with source: %s\n %s{} " ,
5353 source ,
54+ exc ,
55+ exc_info = True ,
5456 )
55- logger .debug (exc , exc_info = True )
5657 return []
5758
5859
Original file line number Diff line number Diff line change @@ -29,16 +29,3 @@ async def maybe_awaitable(
2929 if inspect .isawaitable (possible_coroutine ):
3030 return await possible_coroutine
3131 return possible_coroutine # type: ignore
32-
33-
34- def remove_suffix (text : str , suffix : str ) -> str :
35- """
36- Removing a Suffix from a String with a Custom Function.
37-
38- :param text: String
39- :param suffix: Removing a Suffix
40- :return: value.
41- """
42- if text .endswith (suffix ):
43- return text [: - len (suffix )]
44- return text
You can’t perform that action at this time.
0 commit comments