autodiscover_tasks
Automatically discovers task modules within a list of packages by searching for a specified related module name, while utilizing a global lock to prevent concurrent execution.
def autodiscover_tasks(
packages: list,
related_name: string = 'tasks'
) - > list
Automatically discovers and imports task modules within a list of packages to register them with the system.
Parameters
| Name | Type | Description |
|---|---|---|
| packages | list | A collection of package names or paths to search for task modules. |
| related_name | string = 'tasks' | The name of the submodule to look for within each package, typically used to identify task definitions. |
Returns
| Type | Description |
|---|---|
list | A list of the discovered and imported task modules found within the provided packages. |