class Saviour::Config
Public Class Methods
concurrent_workers()
click to toggle source
# File lib/saviour/config.rb, line 43 def concurrent_workers @concurrent_workers || 4 end
concurrent_workers=(x)
click to toggle source
# File lib/saviour/config.rb, line 47 def concurrent_workers=(x) @concurrent_workers = x end
processing_enabled()
click to toggle source
# File lib/saviour/config.rb, line 14 def processing_enabled Thread.current.thread_variable_set("Saviour::Config", {}) unless Thread.current.thread_variable_get("Saviour::Config") Thread.current.thread_variable_get("Saviour::Config")[:processing_enabled] || true end
processing_enabled=(value)
click to toggle source
# File lib/saviour/config.rb, line 19 def processing_enabled=(value) Thread.current.thread_variable_set("Saviour::Config", {}) unless Thread.current.thread_variable_get("Saviour::Config") Thread.current.thread_variable_get("Saviour::Config")[:processing_enabled] = value end
storage()
click to toggle source
# File lib/saviour/config.rb, line 24 def storage @semaphore.synchronize do Thread.current.thread_variable_set("Saviour::Config", {}) unless Thread.current.thread_variable_get("Saviour::Config") Thread.current.thread_variable_get("Saviour::Config")[:storage] || (Thread.main.thread_variable_get("Saviour::Config") && Thread.main.thread_variable_get("Saviour::Config")[:storage]) || NotImplemented.new end end
storage=(value)
click to toggle source
# File lib/saviour/config.rb, line 31 def storage=(value) @semaphore.synchronize do Thread.current.thread_variable_set("Saviour::Config", {}) unless Thread.current.thread_variable_get("Saviour::Config") Thread.current.thread_variable_get("Saviour::Config")[:storage] = value if Thread.main.thread_variable_get("Saviour::Config").nil? Thread.main.thread_variable_set("Saviour::Config", {}) Thread.main.thread_variable_get("Saviour::Config")[:storage] = value end end end