[ap4r-devel] [931] trunk/ap4r: Fixed: qdb connection via PostgresPR etc. \nContributed by cypher256.

kato-k at rubyforge.org kato-k at rubyforge.org
Tue Jan 20 03:24:55 EST 2009


Revision: 931
Author:   kato-k
Date:     2009-01-20 03:24:54 -0500 (Tue, 20 Jan 2009)

Log Message:
-----------
Fixed: qdb connection via PostgresPR etc.\nContributed by cypher256.

Modified Paths:
--------------
    trunk/ap4r/History.txt
    trunk/ap4r/config/queues_pgsql.cfg
    trunk/ap4r/lib/ap4r/message_store_ext.rb

Modified: trunk/ap4r/History.txt
===================================================================
--- trunk/ap4r/History.txt	2008-03-17 04:14:09 UTC (rev 930)
+++ trunk/ap4r/History.txt	2009-01-20 08:24:54 UTC (rev 931)
@@ -1,4 +1,6 @@
 == 0.3.x
+* Fixed: qdb connection via PostgresPR etc.
+         Based on a patch from cypher256 <kashihara at gmail.com>
 
 === 0.3.6 (February 6, 2008)
 * Added: configuration to set HTTP timeout.

Modified: trunk/ap4r/config/queues_pgsql.cfg
===================================================================
--- trunk/ap4r/config/queues_pgsql.cfg	2008-03-17 04:14:09 UTC (rev 930)
+++ trunk/ap4r/config/queues_pgsql.cfg	2009-01-20 08:24:54 UTC (rev 931)
@@ -1,12 +1,13 @@
---- 
-store: 
+---
+store:
   type: postgresql
-  uri: # default is tcp://localhost:5432
+  host: localhost
+  port: 5432
   database: ap4r
   username: ap4r
   password: ap4r
-drb: 
-  host: 
+drb:
+  host:
   port: 6438
   acl: allow 127.0.0.1 allow ::1 allow 10.0.0.0/8
 dispatchers:
@@ -14,6 +15,6 @@
     targets: queue.*
     threads: 1
 #carriers:
-#  - 
+#  -
 #    source_uri: druby://another.host.local:6438
 #    threads: 1

Modified: trunk/ap4r/lib/ap4r/message_store_ext.rb
===================================================================
--- trunk/ap4r/lib/ap4r/message_store_ext.rb	2008-03-17 04:14:09 UTC (rev 930)
+++ trunk/ap4r/lib/ap4r/message_store_ext.rb	2009-01-20 08:24:54 UTC (rev 931)
@@ -497,7 +497,7 @@
         maybe_result = original_query(q, &block)
         puts "PostgresPR: query called by #{q}" if $DEBUG
         puts "PostgresPR::Connenction#query returns #{maybe_result}(class: #{maybe_result.class})." if $DEBUG
-        return maybe_result.rows unless block && maybe_result.kind_of?(PostgresPR::Connection::Result)
+        return maybe_result unless block && maybe_result.kind_of?(PostgresPR::Connection::Result)
         begin
           puts "PostgresPR extention: about to yield result." if $DEBUG
           block.call(maybe_result.rows)




More information about the ap4r-devel mailing list