apply_target
Executes a target function with the provided arguments and keyword arguments, optionally handling callbacks and process ID retrieval through the base implementation.
def apply_target(
target: callable,
args: tuple,
kwargs: dict,
callback: callable,
accept_callback: callable,
getpid: callable
) - > Any
Executes a target function with the provided arguments and manages lifecycle callbacks for the resulting task.
Parameters
| Name | Type | Description |
|---|---|---|
| target | callable | The function or task to be executed. |
| args | tuple | Positional arguments to pass to the target function. |
| kwargs | dict | Keyword arguments to pass to the target function. |
| callback | callable | A function to be executed upon successful completion of the target. |
| accept_callback | callable | A function to be executed when the task is accepted for processing. |
| getpid | callable | A callable that returns the process ID to associate with the task execution. |
Returns
| Type | Description |
|---|---|
Any | The result of the underlying base application call, typically representing the task execution state. |