Class: Legion::Extensions::Llm::AzureFoundry::Actor::DiscoveryRefresh

Inherits:
Actors::Every
  • Object
show all
Includes:
Helpers::Lex, ActivationHelpers, DiscoveryHealthDisplay, HealthCheckHelpers, InitialReadinessHelpers, InstanceConfigHelpers, InstanceIdentityHelpers, OfferingBuilderHelpers, OfferingComparisonHelpers, ProbeHelpers, RefreshHelpers, ShutdownHelpers, WeightPublicationHelpers, Logging::Helper
Defined in:
lib/legion/extensions/llm/azure_foundry/actors/discovery_refresh.rb

Overview

SSOT v3 periodic discovery actor for Azure AI Foundry provider instances. Claims configured instances (single source: AzureFoundry.discover_instances), discovers deployments from config, probes health via models/info, and publishes complete OfferingDraft snapshots through the Inventory::Publisher. Supports recovery of instances that failed initial readiness, per-tick reconciliation of late-removed instances, and coalesced reactive probes after dispatch-triggered instance_unavailable transitions.

Constant Summary

Constants included from DiscoveryHealthDisplay

Legion::Extensions::Llm::AzureFoundry::Actor::DiscoveryHealthDisplay::LEGACY_CAPABILITY_NAMES

Constants included from OfferingComparisonHelpers

OfferingComparisonHelpers::SCALAR_EVIDENCE_FIELDS

Instance Method Summary collapse

Instance Method Details

#check_subtask?Boolean

Returns:

  • (Boolean)


944
# File 'lib/legion/extensions/llm/azure_foundry/actors/discovery_refresh.rb', line 944

def check_subtask?  = false

#generate_task?Boolean

Returns:

  • (Boolean)


945
# File 'lib/legion/extensions/llm/azure_foundry/actors/discovery_refresh.rb', line 945

def generate_task?  = false

#manualObject



951
952
953
954
955
956
957
958
# File 'lib/legion/extensions/llm/azure_foundry/actors/discovery_refresh.rb', line 951

def manual
  @instance_states ||= Concurrent::Map.new
  state_mutex
  dormant_weight_tracker
  tick_refresh
rescue StandardError => e
  handle_exception(e, level: :warn, operation: 'azure_foundry.actor.discovery_refresh')
end

#run_now?Boolean

Returns:

  • (Boolean)


942
# File 'lib/legion/extensions/llm/azure_foundry/actors/discovery_refresh.rb', line 942

def run_now?        = true

#runner_classObject



940
# File 'lib/legion/extensions/llm/azure_foundry/actors/discovery_refresh.rb', line 940

def runner_class    = self.class

#runner_functionObject



941
# File 'lib/legion/extensions/llm/azure_foundry/actors/discovery_refresh.rb', line 941

def runner_function = 'manual'

#shutdownObject



960
961
962
963
964
# File 'lib/legion/extensions/llm/azure_foundry/actors/discovery_refresh.rb', line 960

def shutdown
  remove_all_instances
rescue StandardError => e
  handle_exception(e, level: :warn, operation: 'azure_foundry.actor.discovery_refresh.shutdown')
end

#timeObject



947
948
949
# File 'lib/legion/extensions/llm/azure_foundry/actors/discovery_refresh.rb', line 947

def time
  discovery_interval_seconds
end

#use_runner?Boolean

Returns:

  • (Boolean)


943
# File 'lib/legion/extensions/llm/azure_foundry/actors/discovery_refresh.rb', line 943

def use_runner?     = false