From: Thierry Parmentelat <thierry.parmentelat@inria.fr>
Date: Mon, 16 Sep 2013 07:04:38 +0000 (+0200)
Subject: dives into publish_result
X-Git-Tag: myslice-0.2-3~20
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b5026ae49bf273530be0e78ea856b883691ed716;p=myslice.git

dives into publish_result
---

diff --git a/manifold/js/manifold.js b/manifold/js/manifold.js
index bf76fd82..726e68fd 100644
--- a/manifold/js/manifold.js
+++ b/manifold/js/manifold.js
@@ -419,17 +419,22 @@ var manifold = {
 
         // NEW PLUGIN API
         manifold.raise_record_event(query.query_uuid, CLEAR_RECORDS);
+        if (manifold.publish_result_debug) messages.debug(".. publish_result (1) ");
+	var count=0;
         $.each(result, function(i, record) {
             manifold.raise_record_event(query.query_uuid, NEW_RECORD, record);
+	    count += 1;
         });
+        if (manifold.publish_result_debug) messages.debug(".. publish_result NEW API (2) count=" + count);
         manifold.raise_record_event(query.query_uuid, DONE);
 
         // OLD PLUGIN API BELOW
         /* Publish an update announce */
         var channel="/results/" + query.query_uuid + "/changed";
-        if (manifold.asynchroneous_debug)
-            messages.debug("publishing result on " + channel);
+        if (manifold.publish_result_debug) messages.debug(".. publish_result OLD API (3) " + channel);
         jQuery.publish(channel, [result, query]);
+
+	if (manifold.publish_result_debug) messages.debug(".. publish_result - END (4) q=" + query.__repr());
     },
 
     /*!