Task registry for Celery applications (ported from celery.app.registry.TaskRegistry).
Maintains a global ETS table mapping task names to %Celery.Task.Definition{} structs,
while also supporting per-app task maps on %Celery{}.
Summary
Functions
Returns all registered tasks as a map of %{name => task_def}, merging global and app-specific tasks.
Returns a specification to start this module under a supervisor.
Fetches a task definition by name or raises Celery.NotRegistered.
Returns a sorted list of all registered task names.
Resolves a module from either an Elixir module atom (Src.Tasks) or a Python-style
dotted module string ("src.tasks" -> Src.Tasks), loads its __celery_tasks__/0
definitions if present, and registers them.
Looks up a task definition by name in an optional app's local registry or the global registry.
Converts a Python-style dotted module name (e.g. "src.tasks") or Elixir module string
(e.g. "Src.Tasks", "Elixir.Src.Tasks") into candidate Elixir module atoms.
Converts an Elixir module atom into a Python-style dotted module string
(e.g. Src.Tasks -> "src.tasks").
Registers a %Celery.Task.Definition{} in the global registry.
Starts the global Celery task registry.
Unregisters a task by name from the global registry.
Functions
Returns all registered tasks as a map of %{name => task_def}, merging global and app-specific tasks.
Returns a specification to start this module under a supervisor.
See Supervisor.
Fetches a task definition by name or raises Celery.NotRegistered.
Returns a sorted list of all registered task names.
Resolves a module from either an Elixir module atom (Src.Tasks) or a Python-style
dotted module string ("src.tasks" -> Src.Tasks), loads its __celery_tasks__/0
definitions if present, and registers them.
@spec lookup(String.t(), map() | nil) :: {:ok, map()} | {:error, Celery.NotRegistered.t()}
Looks up a task definition by name in an optional app's local registry or the global registry.
Converts a Python-style dotted module name (e.g. "src.tasks") or Elixir module string
(e.g. "Src.Tasks", "Elixir.Src.Tasks") into candidate Elixir module atoms.
Converts an Elixir module atom into a Python-style dotted module string
(e.g. Src.Tasks -> "src.tasks").
@spec register(map()) :: :ok
Registers a %Celery.Task.Definition{} in the global registry.
Starts the global Celery task registry.
@spec unregister(String.t()) :: :ok
Unregisters a task by name from the global registry.