Enable sync output to stdout (useful for sync log watching)

This commit is contained in:
Paul van Tilburg 2015-03-11 22:41:05 +01:00
parent 9f00831b5a
commit 4a58375c65
1 changed files with 3 additions and 0 deletions

View File

@ -61,6 +61,9 @@ engine = Hued::Engine.new
Signal.trap("INT") { EM.stop }
Signal.trap("TERM") { EM.stop }
# Write sync to stdout
$stdout.sync = true
# Trigger rule execution and light status refreshing periodically
EM.run do
EM.add_periodic_timer(10) { engine.reload; engine.execute }