How can I implement launching tasks with an interval of less than one minute, for example 10 seconds?
This is necessary in order not to create:
whileTrue:
awaitasyncio.sleep(10)
...
And do not wrap it in try: ... except ExampleException: ..., so that the task does not crash and does not process the code anymore.
OR:
@broker.task(task_name="my_task",timeout=10,)asyncdefmy_task() ->None:
awaitasync_card_check_payments()
@broker.task(task_name="infinity my task",)asyncdefinfinity_my_task() ->None:
whileTrue:
awaitmy_task.kiq()
awaitasyncio.sleep(5)
How can I implement launching tasks with an interval of less than one minute, for example 10 seconds?
This is necessary in order not to create:
And do not wrap it in
try: ... except ExampleException: ..., so that the task does not crash and does not process the code anymore.OR: