Class: Juici::App
- Inherits:
-
Object
- Object
- Juici::App
- Defined in:
- lib/juici/app.rb
Constant Summary collapse
- @@watchers =
[]
Instance Attribute Summary collapse
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ App
constructor
A new instance of App.
- #spawn_watcher ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ App
Returns a new instance of App.
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/juici/app.rb', line 22 def initialize(opts={}) @opts = opts # NOTE: this happening before we start a build queue is important, it # means we can't start any more workers and get tied in knots # clear_stale_children # # Urgh init_build_queue reload_unfinished_work start_workers end |
Instance Attribute Details
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
21 22 23 |
# File 'lib/juici/app.rb', line 21 def opts @opts end |
Class Method Details
.shutdown ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/juici/app.rb', line 9 def self.shutdown ::Juici.dbgp "Shutting down Juici" @@watchers.each do |watcher| ::Juici.dbgp "Killing #{watcher.inspect}" watcher.kill watcher.join ::Juici.dbgp "Dead: #{watcher.inspect}" end shutdown_build_queue end |