diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-27 09:42:58 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-27 09:42:58 +0200 |
commit | 6afb0ea9561894e4a4a027961ae2301276171b32 (patch) | |
tree | e6a3ebdc07b3a8b705ebb6dca2ee7c06c7218459 | |
parent | 0a79ea102e6277fdb81cc3a160124202fa040c3f (diff) | |
download | edoors-ruby-6afb0ea9561894e4a4a027961ae2301276171b32.zip edoors-ruby-6afb0ea9561894e4a4a027961ae2301276171b32.tar.gz |
Spin: debug_errors->debug_garbage, clear! clears links too
-rw-r--r-- | lib/edoors/door.rb | 2 | ||||
-rw-r--r-- | lib/edoors/spin.rb | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/edoors/door.rb b/lib/edoors/door.rb index 2b5e855..553cb88 100644 --- a/lib/edoors/door.rb +++ b/lib/edoors/door.rb @@ -77,7 +77,7 @@ module Edoors # release the Particle that have not been released or sent by user code # def _garbage - puts " ! #{path} didn't give back #{@saved}" if @spin.debug_errors + puts " ! #{path} didn't give back #{@saved}" if @spin.debug_garbage puts "\t#{@saved.data Edoors::FIELD_ERROR_MSG}" if @saved.action==Edoors::ACT_ERROR @spin.release_p @saved @saved = nil diff --git a/lib/edoors/spin.rb b/lib/edoors/spin.rb index 9f62b47..b8f8c65 100644 --- a/lib/edoors/spin.rb +++ b/lib/edoors/spin.rb @@ -34,7 +34,7 @@ module Edoors @run = false @hibernation = o['hibernation']||false @hibernate_path = 'edoors-hibernate-'+n+'.json' - @debug_errors = o[:debug_errors]||o['debug_errors']||false + @debug_garbage = o[:debug_garbage]||o['debug_garbage']||false @debug_routing = o[:debug_routing]||o['debug_routing']||false # if not o.empty? @@ -58,7 +58,7 @@ module Edoors end end # - attr_accessor :run, :hibernate_path, :debug_errors, :debug_routing + attr_accessor :run, :hibernate_path, :debug_garbage, :debug_routing # def to_json *a { @@ -69,7 +69,7 @@ module Edoors 'inner_room' => { :iotas=>@iotas, :links=>@links }, 'sys_fifo' => @sys_fifo, 'app_fifo' => @app_fifo, - 'debug_errors' => @debug_errors, + 'debug_garbage' => @debug_garbage, 'debug_routing' => @debug_routing }.to_json(*a) end @@ -88,6 +88,7 @@ module Edoors end # def clear! + @links.clear @iotas.clear @world.clear @pool.clear |