Class: ActiveMatrix::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/active_matrix.rb

Overview

Configuration class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Configuration

Returns a new instance of Configuration.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/active_matrix.rb', line 35

def initialize
  # Set defaults
  @agent_startup_delay = 2
  @max_agents_per_process = 10
  @agent_health_check_interval = 30
  @conversation_history_limit = 20
  @conversation_stale_after = 86_400 # 1 day
  @memory_cleanup_interval = 3600 # 1 hour
  @event_queue_size = 1000
  @event_processing_timeout = 30
  @max_clients_per_homeserver = 5
  @client_idle_timeout = 300 # 5 minutes
  @agent_log_level = :info
  @log_agent_events = false
  # Daemon defaults
  @daemon_workers = 1
  @probe_port = 3042
  @probe_host = '127.0.0.1'
  @shutdown_timeout = 30
end

Instance Attribute Details

#agent_health_check_interval ⇒ Object

Returns the value of attribute agent_health_check_interval.



26
27
28
# File 'lib/active_matrix.rb', line 26

def agent_health_check_interval
  @agent_health_check_interval
end

#agent_log_level ⇒ Object

Returns the value of attribute agent_log_level.



26
27
28
# File 'lib/active_matrix.rb', line 26

def agent_log_level
  @agent_log_level
end

#agent_startup_delay ⇒ Object

Returns the value of attribute agent_startup_delay.



26
27
28
# File 'lib/active_matrix.rb', line 26

def agent_startup_delay
  @agent_startup_delay
end

#client_idle_timeout ⇒ Object

Returns the value of attribute client_idle_timeout.



26
27
28
# File 'lib/active_matrix.rb', line 26

def client_idle_timeout
  @client_idle_timeout
end

#conversation_history_limit ⇒ Object

Returns the value of attribute conversation_history_limit.



26
27
28
# File 'lib/active_matrix.rb', line 26

def conversation_history_limit
  @conversation_history_limit
end

#conversation_stale_after ⇒ Object

Returns the value of attribute conversation_stale_after.



26
27
28
# File 'lib/active_matrix.rb', line 26

def conversation_stale_after
  @conversation_stale_after
end

#daemon_workers ⇒ Object

Returns the value of attribute daemon_workers.



26
27
28
# File 'lib/active_matrix.rb', line 26

def daemon_workers
  @daemon_workers
end

#event_processing_timeout ⇒ Object

Returns the value of attribute event_processing_timeout.



26
27
28
# File 'lib/active_matrix.rb', line 26

def event_processing_timeout
  @event_processing_timeout
end

#event_queue_size ⇒ Object

Returns the value of attribute event_queue_size.



26
27
28
# File 'lib/active_matrix.rb', line 26

def event_queue_size
  @event_queue_size
end

#log_agent_events ⇒ Object

Returns the value of attribute log_agent_events.



26
27
28
# File 'lib/active_matrix.rb', line 26

def log_agent_events
  @log_agent_events
end

#max_agents_per_process ⇒ Object

Returns the value of attribute max_agents_per_process.



26
27
28
# File 'lib/active_matrix.rb', line 26

def max_agents_per_process
  @max_agents_per_process
end

#max_clients_per_homeserver ⇒ Object

Returns the value of attribute max_clients_per_homeserver.



26
27
28
# File 'lib/active_matrix.rb', line 26

def max_clients_per_homeserver
  @max_clients_per_homeserver
end

#memory_cleanup_interval ⇒ Object

Returns the value of attribute memory_cleanup_interval.



26
27
28
# File 'lib/active_matrix.rb', line 26

def memory_cleanup_interval
  @memory_cleanup_interval
end

#probe_host ⇒ Object

Returns the value of attribute probe_host.



26
27
28
# File 'lib/active_matrix.rb', line 26

def probe_host
  @probe_host
end

#probe_port ⇒ Object

Returns the value of attribute probe_port.



26
27
28
# File 'lib/active_matrix.rb', line 26

def probe_port
  @probe_port
end

#shutdown_timeout ⇒ Object

Returns the value of attribute shutdown_timeout.



26
27
28
# File 'lib/active_matrix.rb', line 26

def shutdown_timeout
  @shutdown_timeout
end