10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/crabfarm/modes/live.rb', line 10
def start_watch
Utils::Console.system 'Starting crabfarm live'
begin
Crabfarm.enable_debugging!
Crabfarm.install_live_backend!
Crabfarm.live.start
controller = Crabfarm::Live::Controller.new Crabfarm.live
watcher = Crabfarm::Live::Watcher.new controller
watcher.watch 0.2
rescue SystemExit, Interrupt
rescue Exception => exc
Utils::Console.error "Fatal error!"
Utils::Console.exception exc
ensure
Utils::Console.system 'Exiting'
Crabfarm.live.stop
end
end
|