From 6afb0ea9561894e4a4a027961ae2301276171b32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 27 Jun 2012 09:42:58 +0200 Subject: Spin: debug_errors->debug_garbage, clear! clears links too --- lib/edoors/door.rb | 2 +- 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 -- cgit v1.1-2-g2b99