Class: Legion::Extensions::MicrosoftTeams::Actor::ProfileIngest
- Inherits:
-
Actors::Once
- Object
- Actors::Once
- Legion::Extensions::MicrosoftTeams::Actor::ProfileIngest
- Defined in:
- lib/legion/extensions/microsoft_teams/actors/profile_ingest.rb
Instance Method Summary collapse
- #check_subtask? ⇒ Boolean
- #delay ⇒ Object
- #enabled? ⇒ Boolean
- #generate_task? ⇒ Boolean
- #manual ⇒ Object
- #runner_class ⇒ Object
- #runner_function ⇒ Object
- #use_runner? ⇒ Boolean
Instance Method Details
#check_subtask? ⇒ Boolean
11 |
# File 'lib/legion/extensions/microsoft_teams/actors/profile_ingest.rb', line 11 def check_subtask? = false |
#delay ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/legion/extensions/microsoft_teams/actors/profile_ingest.rb', line 14 def delay auth_validator = Legion::Extensions::Identity::Entra::Delegated::Actor::AuthValidator.allocate base_delay = auth_validator.respond_to?(:delay) ? auth_validator.delay.to_f : 9.0 base_delay + 5.0 rescue StandardError => e handle_exception(e, level: :debug, operation: 'ProfileIngest#delay') 14.0 end |
#enabled? ⇒ Boolean
23 24 25 26 27 28 29 |
# File 'lib/legion/extensions/microsoft_teams/actors/profile_ingest.rb', line 23 def enabled? defined?(Legion::Extensions::Agentic::Memory::Trace::Runners::Traces) && token_available? rescue StandardError => e handle_exception(e, level: :debug, operation: 'ProfileIngest#enabled?') false end |
#generate_task? ⇒ Boolean
12 |
# File 'lib/legion/extensions/microsoft_teams/actors/profile_ingest.rb', line 12 def generate_task? = false |
#manual ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/legion/extensions/microsoft_teams/actors/profile_ingest.rb', line 31 def manual log.info('ProfileIngest firing') token = resolve_token unless token log.warn('ProfileIngest: no token available, skipping') return end log.info('ProfileIngest: token acquired, starting ingest') settings = begin Legion::Settings[:microsoft_teams] || {} rescue StandardError => e handle_exception(e, level: :debug, operation: 'ProfileIngest#manual settings') {} end ingest = settings[:ingest] || {} runner_class.full_ingest( token: token, top_people: ingest.fetch(:top_people, 10), message_depth: ingest.fetch(:message_depth, 50) ) rescue StandardError => e handle_exception(e, level: :error, operation: 'ProfileIngest#manual') end |
#runner_class ⇒ Object
8 |
# File 'lib/legion/extensions/microsoft_teams/actors/profile_ingest.rb', line 8 def runner_class = Legion::Extensions::MicrosoftTeams::Runners::ProfileIngest |
#runner_function ⇒ Object
9 |
# File 'lib/legion/extensions/microsoft_teams/actors/profile_ingest.rb', line 9 def runner_function = 'full_ingest' |
#use_runner? ⇒ Boolean
10 |
# File 'lib/legion/extensions/microsoft_teams/actors/profile_ingest.rb', line 10 def use_runner? = false |