* Oupsie
This commit is contained in:
parent
5620a97512
commit
eafc74894d
|
|
@ -18,6 +18,7 @@ async def cancel_task(app: FastAPI, identifier):
|
||||||
tasks: List[Task] = app.state.tasks.get(identifier)
|
tasks: List[Task] = app.state.tasks.get(identifier)
|
||||||
if not tasks:
|
if not tasks:
|
||||||
logger.info(f"Task {identifier} not found, can't cancel")
|
logger.info(f"Task {identifier} not found, can't cancel")
|
||||||
|
return
|
||||||
for task in tasks:
|
for task in tasks:
|
||||||
try:
|
try:
|
||||||
task.cancel()
|
task.cancel()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user