Remote control and inspection commands for Celery workers over Kombu.Pidbox
(ported from celery.worker.control and celery.app.control).
Supports standard Celery control/inspect methods:
ping->%{"ok" => "pong"}registered-> list of registered task namesactive-> list of currently executing task request info mapsreserved-> list of prefetched/reserved task request info mapsscheduled-> list of ETA-scheduled task mapsrevoked-> list of revoked task IDsstats-> worker statistics dictionaryrevoke-> revokes one or moretask_ids
Summary
Functions
Broadcasts a control/inspect command to workers via Kombu.Pidbox.
Builds the handler map used by a Celery.Worker's Kombu.Pidbox.Node to respond to
remote control and inspect requests from Python or Elixir Celery clients.
Creates a %Kombu.Pidbox.Mailbox{} for the given %Celery{} or %Celery.Config{}.
Pings active workers via Kombu.Pidbox and collects replies.
Broadcasts a revoke command for task_id (or a list of task IDs) to workers.
Functions
@spec broadcast(Celery.t() | Celery.Config.t(), String.t(), map(), keyword()) :: :ok | {:ok, list()} | {:error, term()}
Broadcasts a control/inspect command to workers via Kombu.Pidbox.
Builds the handler map used by a Celery.Worker's Kombu.Pidbox.Node to respond to
remote control and inspect requests from Python or Elixir Celery clients.
@spec mailbox(Celery.t() | Celery.Config.t()) :: Kombu.Pidbox.Mailbox.t()
Creates a %Kombu.Pidbox.Mailbox{} for the given %Celery{} or %Celery.Config{}.
@spec ping(Celery.t() | Celery.Config.t(), keyword()) :: {:ok, list()} | {:error, term()}
Pings active workers via Kombu.Pidbox and collects replies.
@spec revoke(Celery.t() | Celery.Config.t(), String.t() | [String.t()], keyword()) :: :ok | {:ok, list()} | {:error, term()}
Broadcasts a revoke command for task_id (or a list of task IDs) to workers.