FIrst of all thanks for this very handy package to all its contributors!
Unfortunately I've stumbled upon a problem. Cron object can handle plain old functions and coroutine functions perfectly fine. However there is no support for plain old functions returning Awaitable[...] instances i.e.:
C:\Users\-----\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py:1860: RuntimeWarning: coroutine 'test' was never awaited
handle = None # Needed to break cycles when an exception occurs.
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Actually it's quite easy to nest such functions inside proper coroutine. But I've spent a couple of hours trying to figure out why my callbacks are not invoked.
It would be great to spare others from this kind of frustration =)
Hi!
FIrst of all thanks for this very handy package to all its contributors!
Unfortunately I've stumbled upon a problem.
Cron
object can handle plain old functions and coroutine functions perfectly fine. However there is no support for plain old functions returningAwaitable[...]
instances i.e.:There is also such message in the stderr:
Actually it's quite easy to nest such functions inside proper coroutine. But I've spent a couple of hours trying to figure out why my callbacks are not invoked. It would be great to spare others from this kind of frustration =)