[gnome-documents] application: add a debug env var to disable miner refresh



commit ac81c6bf5dc9f28928dec3c7e9971a06728bdab3
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Jun 6 10:02:13 2012 -0400

    application: add a debug env var to disable miner refresh
    
    Useful in situations where you don't want to hit the network too much
    when testing.

 src/application.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index bb72d48..3202f7b 100644
--- a/src/application.js
+++ b/src/application.js
@@ -147,6 +147,10 @@ const Application = new Lang.Class({
     },
 
     _refreshMinerNow: function(miner) {
+        let env = GLib.getenv('DOCUMENTS_DISABLE_MINERS');
+        if (env)
+            return false;
+
         miner.RefreshDBRemote(DBus.CALL_FLAG_START, Lang.bind(this,
             function(res, error) {
                 if (error) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]