Skip to content

Commit 3a1bc33

Browse files
author
Andrei Neagu
committed
removed task timeout
1 parent b9f1581 commit 3a1bc33

File tree

1 file changed

+1
-6
lines changed
  • packages/service-library/src/servicelib/long_running_tasks

1 file changed

+1
-6
lines changed

packages/service-library/src/servicelib/long_running_tasks/task.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929
_logger = logging.getLogger(__name__)
3030

3131

32-
_CANCEL_TASK_TIMEOUT: Final[PositiveFloat] = datetime.timedelta(
33-
seconds=10 # NOTE: 1 second is too short to cleanup a task
34-
).total_seconds()
35-
3632
_CANCEL_TASKS_CHECK_INTERVAL: Final[datetime.timedelta] = datetime.timedelta(seconds=5)
3733
_STATUS_UPDATE_CHECK_INTERNAL: Final[datetime.timedelta] = datetime.timedelta(seconds=1)
3834

@@ -368,8 +364,7 @@ async def _cancel_tracked_task(
368364
) -> None:
369365
try:
370366
await self._tasks_data.set_as_cancelled(task_id, with_task_context)
371-
# TODO: remove this cancellation timeout
372-
await cancel_wait_task(task, max_delay=_CANCEL_TASK_TIMEOUT)
367+
await cancel_wait_task(task)
373368
except Exception as e: # pylint:disable=broad-except
374369
_logger.info(
375370
"Task %s cancellation failed with error: %s",

0 commit comments

Comments
 (0)