[Madeleine-commit] madeleine/lib/madeleine automatic.rb,1.33,1.34
Status: Beta
Brought to you by:
ndrs
From: S S. <sd...@us...> - 2004-07-19 20:18:45
|
Update of /cvsroot/madeleine/madeleine/lib/madeleine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12775/lib/madeleine Modified Files: automatic.rb Log Message: Use execute_query for read-only commands in automatic Index: automatic.rb =================================================================== RCS file: /cvsroot/madeleine/madeleine/lib/madeleine/automatic.rb,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** automatic.rb 7 Jul 2004 19:59:49 -0000 1.33 --- automatic.rb 19 Jul 2004 20:18:36 -0000 1.34 *************** *** 172,176 **** # print "Sending #{symbol} to #{@thing.to_s}, myid=#{@myid}, sysid=#{@sysid}\n" raise NoMethodError, "Undefined method" unless @thing.respond_to?(symbol) ! if (Thread.current[:system] || @thing.read_only_methods.include?(symbol)) @thing.send(symbol, *args, &block) else --- 172,176 ---- # print "Sending #{symbol} to #{@thing.to_s}, myid=#{@myid}, sysid=#{@sysid}\n" raise NoMethodError, "Undefined method" unless @thing.respond_to?(symbol) ! if (Thread.current[:system]) @thing.send(symbol, *args, &block) else *************** *** 178,182 **** Thread.current[:system] = AutomaticSnapshotMadeleine.systems[@sysid] begin ! result = Thread.current[:system].execute_command(Command.new(symbol, @myid, *args)) ensure Thread.current[:system] = false --- 178,186 ---- Thread.current[:system] = AutomaticSnapshotMadeleine.systems[@sysid] begin ! if (@thing.read_only_methods.include?(symbol)) ! result = Thread.current[:system].execute_query(Command.new(symbol, @myid, *args)) ! else ! result = Thread.current[:system].execute_command(Command.new(symbol, @myid, *args)) ! end ensure Thread.current[:system] = false |