Skip to content

Commit 4d7ec87

Browse files
fix: rename
1 parent a5996b0 commit 4d7ec87

File tree

1 file changed

+4
-4
lines changed
  • packages/celery-library/src/celery_library

1 file changed

+4
-4
lines changed

packages/celery-library/src/celery_library/task.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ def wrapper(task: Task, *args: P.args, **kwargs: P.kwargs) -> R:
4747
# NOTE: task.request is a thread local object, so we need to pass the id explicitly
4848
assert task.request.id is not None # nosec
4949

50-
async def run_task(task_id: TaskID) -> R:
50+
async def _run_task(task_id: TaskID) -> R:
5151
try:
5252
async with asyncio.TaskGroup() as tg:
5353
main_task = tg.create_task(
5454
coro(task, *args, **kwargs),
5555
)
5656

57-
async def abort_monitor():
57+
async def _abort_monitor():
5858
while not main_task.done():
5959
if not await app_server.task_manager.task_exists(
6060
task_id
@@ -68,7 +68,7 @@ async def abort_monitor():
6868
_DEFAULT_ABORT_TASK_TIMEOUT.total_seconds()
6969
)
7070

71-
tg.create_task(abort_monitor())
71+
tg.create_task(_abort_monitor())
7272

7373
return main_task.result()
7474
except BaseExceptionGroup as eg:
@@ -84,7 +84,7 @@ async def abort_monitor():
8484
raise other_errors.exceptions[0] from eg
8585

8686
return asyncio.run_coroutine_threadsafe(
87-
run_task(task.request.id),
87+
_run_task(task.request.id),
8888
app_server.event_loop,
8989
).result()
9090

0 commit comments

Comments
 (0)