group = Group(timeout=4)
@group.task(trigger=Every(...))
async def _(...): # this task will fail every time it runs
await asyncio.sleep(6)
set a timeout for each task
group = Group(timeout=4)
@group.task(trigger=Every(...)) # this task has the group's timeout
async def _(...): ...
@group.task(trigger=Every(...), timeout=3) # this task has its specific timeout
async def _(...): ...
App
set a timeout for each task
app = AioClock()
@app.task(trigger=Every(...)) # this task does not have a timeout
async def _(...): ...
@app.task(trigger=Every(...), timeout=3) # this task has its specific timeout
async def _(...): ...
PS
I didn't know how to write tests for this feature, however all old tests are passed.
What's new
Groups
Set a
timeout
for a group of tasks.set a
timeout
for each taskApp
set a
timeout
for each taskPS
I didn't know how to write tests for this feature, however all old tests are passed.