Class: Legion::Extensions::Llm::Mlx::Actor::DiscoveryRefresh
- Inherits:
-
Actors::Every
- Object
- Actors::Every
- Legion::Extensions::Llm::Mlx::Actor::DiscoveryRefresh
show all
- Includes:
- EvidenceBuilding, HealthDisplay, HealthProbing, HttpConnections, InstanceConfig, OfferingAssembly, OfferingComparison, TickCycle, ValueEvidenceBuilding, WeightPublication, Logging::Helper
- Defined in:
- lib/legion/extensions/llm/mlx/actors/discovery_refresh.rb
Overview
SSOT v3 periodic discovery actor for MLX provider instances.
Claims configured instances, discovers models via /v1/models,
probes health via /health, and publishes complete OfferingDraft
snapshots through the Inventory::Publisher. Supports coalesced
reactive probes after dispatch-triggered instance_unavailable
transitions.
Constant Summary
collapse
- DEFAULT_DISCOVERY_INTERVAL_SECONDS =
Mirrors the registered lex-llm default
(discovery.interval_seconds); used only when the settings tree
has no discovery section. time must never return nil — a
TimerTask with a nil interval fires exactly once and stops.
300
HealthDisplay::HEALTH_SOURCE
OfferingComparison::OFFERING_SCALAR_EVIDENCE_FIELDS
EvidenceBuilding::EMBEDDING_PATTERN, EvidenceBuilding::UNKNOWN_EVIDENCE_SRC
Instance Method Summary
collapse
Instance Method Details
#check_subtask? ⇒ Boolean
783
|
# File 'lib/legion/extensions/llm/mlx/actors/discovery_refresh.rb', line 783
def check_subtask? = false
|
#generate_task? ⇒ Boolean
784
|
# File 'lib/legion/extensions/llm/mlx/actors/discovery_refresh.rb', line 784
def generate_task? = false
|
#manual ⇒ Object
791
792
793
794
795
|
# File 'lib/legion/extensions/llm/mlx/actors/discovery_refresh.rb', line 791
def manual
tick_refresh
rescue StandardError => e
handle_exception(e, level: :warn, operation: 'mlx.actor.discovery_refresh')
end
|
#run_now? ⇒ Boolean
781
|
# File 'lib/legion/extensions/llm/mlx/actors/discovery_refresh.rb', line 781
def run_now? = true
|
#runner_class ⇒ Object
779
|
# File 'lib/legion/extensions/llm/mlx/actors/discovery_refresh.rb', line 779
def runner_class = self.class
|
#runner_function ⇒ Object
780
|
# File 'lib/legion/extensions/llm/mlx/actors/discovery_refresh.rb', line 780
def runner_function = 'manual'
|
#shutdown ⇒ Object
797
798
799
800
801
|
# File 'lib/legion/extensions/llm/mlx/actors/discovery_refresh.rb', line 797
def shutdown
remove_all_instances
rescue StandardError => e
handle_exception(e, level: :warn, operation: 'mlx.actor.discovery_refresh.shutdown')
end
|
#time ⇒ Object
786
787
788
789
|
# File 'lib/legion/extensions/llm/mlx/actors/discovery_refresh.rb', line 786
def time
interval = settings.dig(:discovery, :interval_seconds)
interval.is_a?(Integer) && interval.positive? ? interval : DEFAULT_DISCOVERY_INTERVAL_SECONDS
end
|
#use_runner? ⇒ Boolean
782
|
# File 'lib/legion/extensions/llm/mlx/actors/discovery_refresh.rb', line 782
def use_runner? = false
|