From: Thierry Parmentelat Date: Sat, 14 Dec 2013 13:57:25 +0000 (+0100) Subject: renamed publish_result_debug into just pubsub_debug, and turn it off X-Git-Tag: myslice-0.3-0~76 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=ca0921e4bc9ac7bbc9199b210c317e9376976f87 renamed publish_result_debug into just pubsub_debug, and turn it off --- diff --git a/manifold/static/js/manifold.js b/manifold/static/js/manifold.js index df8955d1..3d526a67 100644 --- a/manifold/static/js/manifold.js +++ b/manifold/static/js/manifold.js @@ -304,7 +304,7 @@ var manifold = { // reasonably low-noise, shows manifold requests coming in and out asynchroneous_debug : true, // print our more details on result publication and related callbacks - publish_result_debug : true, + pubsub_debug : false, /** * \brief We use js function closure to be able to pass the query (array) @@ -343,7 +343,7 @@ var manifold = { var publish_uuid=tuple.publish_uuid; // by default we publish using the same uuid of course if (publish_uuid==undefined) publish_uuid=query.query_uuid; - if (manifold.publish_result_debug) { + if (manifold.pubsub_debug) { messages.debug("sending POST on " + manifold.proxy_url + query.__repr()); } @@ -396,28 +396,28 @@ var manifold = { // NEW PLUGIN API manifold.raise_record_event(query.query_uuid, CLEAR_RECORDS); - if (manifold.publish_result_debug) + if (manifold.pubsub_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) + if (manifold.pubsub_debug) messages.debug(".. publish_result (2) has used NEW API on " + count + " records"); manifold.raise_record_event(query.query_uuid, DONE); - if (manifold.publish_result_debug) + if (manifold.pubsub_debug) messages.debug(".. publish_result (3) has used NEW API to say DONE"); // OLD PLUGIN API BELOW /* Publish an update announce */ var channel="/results/" + query.query_uuid + "/changed"; - if (manifold.publish_result_debug) + if (manifold.pubsub_debug) messages.debug(".. publish_result (4) OLD API on channel" + channel); $.publish(channel, [result, query]); - if (manifold.publish_result_debug) + if (manifold.pubsub_debug) messages.debug(".. publish_result (5) END q=" + query.__repr()); }, @@ -435,7 +435,7 @@ var manifold = { * otherwise, publish the main object as well as subqueries * XXX how much recursive are we ? */ - if (manifold.publish_result_debug) + if (manifold.pubsub_debug) messages.debug (">>>>> publish_result_rec " + query.object); if (manifold.query_expects_unique_result(query)) { /* Also publish subqueries */ @@ -444,12 +444,12 @@ var manifold = { /* TODO remove object from result */ }); } - if (manifold.publish_result_debug) + if (manifold.pubsub_debug) messages.debug ("===== publish_result_rec " + query.object); manifold.publish_result(query, result); - if (manifold.publish_result_debug) + if (manifold.pubsub_debug) messages.debug ("<<<<< publish_result_rec " + query.object); }, @@ -749,7 +749,7 @@ var manifold = { **************************************************************************/ raise_event_handler: function(type, query_uuid, event_type, value) { - if (manifold.publish_result_debug) + if (manifold.pubsub_debug) messages.debug("raise_event_handler, quuid="+query_uuid+" type="+type+" event_type="+event_type); if ((type != 'query') && (type != 'record')) throw 'Incorrect type for manifold.raise_event()'; @@ -766,10 +766,10 @@ var manifold = { $.each(channels, function(i, channel) { if (value === undefined) { - if (manifold.publish_result_debug) messages.debug("triggering [no value] on channel="+channel+" and event_type="+event_type); + if (manifold.pubsub_debug) messages.debug("triggering [no value] on channel="+channel+" and event_type="+event_type); $('.pubsub').trigger(channel, [event_type]); } else { - if (manifold.publish_result_debug) messages.debug("triggering [value="+value+"] on channel="+channel+" and event_type="+event_type); + if (manifold.pubsub_debug) messages.debug("triggering [value="+value+"] on channel="+channel+" and event_type="+event_type); $('.pubsub').trigger(channel, [event_type, value]); } });