Class: Sidekiq::Embedded
Instance Attribute Summary
Attributes included from Component
#config
Instance Method Summary
collapse
Methods included from Component
#fire_event, #handle_exception, #hostname, #identity, #inspect, #logger, #process_nonce, #redis, #safe_thread, #tid, #watchdog
Constructor Details
#initialize(config) ⇒ Embedded
Returns a new instance of Embedded.
11
12
13
|
# File 'lib/sidekiq/embedded.rb', line 11
def initialize(config)
@config = config
end
|
Instance Method Details
#quiet ⇒ Object
26
27
28
|
# File 'lib/sidekiq/embedded.rb', line 26
def quiet
@launcher&.quiet
end
|
#run ⇒ Object
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/sidekiq/embedded.rb', line 15
def run
housekeeping
fire_event(:startup, reverse: false, reraise: true)
@launcher = Sidekiq::Launcher.new(@config, embedded: true)
@launcher.run
sleep 0.2
logger.info "Sidekiq running embedded, total process thread count: #{Thread.list.size}"
logger.debug { Thread.list.map(&:name) }
end
|
#stop ⇒ Object
30
31
32
|
# File 'lib/sidekiq/embedded.rb', line 30
def stop
@launcher&.stop
end
|