Class: JobBoard::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



23
24
25
26
27
28
29
30
# File 'lib/job_board/configuration.rb', line 23

def initialize
  @http_basic_auth = nil
  @poll_interval = 5
  @per_page = 25
  @stale_process_threshold = nil
  @latency_warning_threshold = 60
  @latency_warning_thresholds = {}
end

Instance Attribute Details

#http_basic_authObject

nil, or { name: "...", password: "..." } to protect the UI with HTTP Basic auth.



4
5
6
# File 'lib/job_board/configuration.rb', line 4

def http_basic_auth
  @http_basic_auth
end

#latency_warning_thresholdObject

Seconds of latency after which a queue is highlighted as breaching. Per-queue override: latency_warning_thresholds = seconds. Queues named in the within_* convention (e.g. "within_5_minutes") get their threshold parsed from the name automatically.



20
21
22
# File 'lib/job_board/configuration.rb', line 20

def latency_warning_threshold
  @latency_warning_threshold
end

#latency_warning_thresholdsObject

Returns the value of attribute latency_warning_thresholds.



21
22
23
# File 'lib/job_board/configuration.rb', line 21

def latency_warning_thresholds
  @latency_warning_thresholds
end

#per_pageObject

Rows per page on job lists.



10
11
12
# File 'lib/job_board/configuration.rb', line 10

def per_page
  @per_page
end

#poll_intervalObject

Seconds between page auto-refreshes. nil or 0 disables polling.



7
8
9
# File 'lib/job_board/configuration.rb', line 7

def poll_interval
  @poll_interval
end

#stale_process_thresholdObject

Heartbeat age after which a process is flagged stale. nil falls back to SolidQueue.process_alive_threshold.



14
15
16
# File 'lib/job_board/configuration.rb', line 14

def stale_process_threshold
  @stale_process_threshold
end