This commit is contained in:
16
lib/elixir_ai/chat_runner/runner_pg.ex
Normal file
16
lib/elixir_ai/chat_runner/runner_pg.ex
Normal file
@@ -0,0 +1,16 @@
|
||||
defmodule ElixirAi.RunnerPG do
|
||||
@moduledoc """
|
||||
Named :pg scope for tracking ChatRunner processes across the cluster.
|
||||
Each ChatRunner joins {:runner, name} on init; :pg syncs membership
|
||||
automatically and removes dead processes without any additional cleanup.
|
||||
"""
|
||||
|
||||
def child_spec(_opts) do
|
||||
%{
|
||||
id: __MODULE__,
|
||||
start: {:pg, :start_link, [__MODULE__]},
|
||||
type: :worker,
|
||||
restart: :permanent
|
||||
}
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user