Skip to content

Commit fb9ff38

Browse files
author
Andrei Neagu
committed
refactor interface for registration
1 parent 84b17df commit fb9ff38

File tree

1 file changed

+3
-5
lines changed
  • packages/service-library/src/servicelib/long_running_tasks

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,10 @@ def register(cls, task: TaskProtocol) -> None:
6565
cls.REGISTERED_TASKS[task.__name__] = task
6666

6767
@classmethod
68-
def register_partial(
69-
cls, task: TaskProtocol, *partial_args, **partial_kwargs
70-
) -> None:
68+
def register_partial(cls, task: TaskProtocol, **partial_kwargs) -> None:
7169
cls.REGISTERED_TASKS[task.__name__] = functools.partial(
72-
task, *partial_args, **partial_kwargs
73-
)
70+
task, **partial_kwargs
71+
) # type: ignore[assignment]
7472

7573
@classmethod
7674
def unregister(cls, task: TaskProtocol) -> None:

0 commit comments

Comments
 (0)