A systemd job returned by manager operations such as StartUnit.
Summary
Functions
Polls until a job leaves waiting/running or disappears from the bus.
Waits for this job's JobRemoved D-Bus signal.
Cancels this job through its D-Bus object.
Reads a job property.
Reads and normalizes the job state.
Types
@type state() :: :waiting | :running | :done | :unknown
@type t() :: %Systemd.Job{object_path: String.t()}
Functions
@spec await(pid(), t(), keyword()) :: :ok | {:error, Systemd.Error.t()}
Polls until a job leaves waiting/running or disappears from the bus.
@spec await_signal(pid(), t(), keyword()) :: :ok | {:error, Systemd.Error.t()}
Waits for this job's JobRemoved D-Bus signal.
@spec cancel(pid(), t()) :: :ok | {:error, Systemd.Error.t()}
Cancels this job through its D-Bus object.
@spec property(pid(), t(), String.t()) :: {:ok, term()} | {:error, Systemd.Error.t()}
Reads a job property.
@spec state(pid(), t()) :: {:ok, state()} | {:error, Systemd.Error.t()}
Reads and normalizes the job state.