You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@senssoft.apache.org by rf...@apache.org on 2017/09/18 17:28:09 UTC

[04/21] incubator-senssoft-useralejs git commit: Fixed issue where the log queue would still be cleared even if logging was paused

Fixed issue where the log queue would still be cleared even if logging was paused


Project: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/commit/782fb868
Tree: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/tree/782fb868
Diff: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/diff/782fb868

Branch: refs/heads/SENSSOFT-192
Commit: 782fb868ce2711dfbf5a6064a500ae4a636c9d36
Parents: 5aa96f8
Author: Rob Foley <ro...@gmail.com>
Authored: Wed Sep 13 08:49:38 2017 -0700
Committer: Rob Foley <ro...@gmail.com>
Committed: Wed Sep 13 08:49:38 2017 -0700

----------------------------------------------------------------------
 src/sendLogs.js | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/blob/782fb868/src/sendLogs.js
----------------------------------------------------------------------
diff --git a/src/sendLogs.js b/src/sendLogs.js
index c2516b9..bbe72a2 100644
--- a/src/sendLogs.js
+++ b/src/sendLogs.js
@@ -33,6 +33,10 @@ export function initSender(logs, config) {
  */
 export function sendOnInterval(logs, config) {
   setInterval(function() {
+    if (!config.on) {
+      return;
+    }
+
     if (logs.length >= config.logCountThreshold) {
       sendLogs(logs.slice(0), config.url, 0); // Send a copy
       logs.splice(0); // Clear array reference (no reassignment)