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 2016/09/21 19:03:58 UTC

[1/2] incubator-senssoft-useralejs git commit: Fixed issue with array reassignment for closure values. Switched to using setInterval.

Repository: incubator-senssoft-useralejs
Updated Branches:
  refs/heads/master 3c1e0c1df -> 505ca3b41


Fixed issue with array reassignment for closure values. Switched to using setInterval.


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/89af0bbe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/tree/89af0bbe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/diff/89af0bbe

Branch: refs/heads/master
Commit: 89af0bbe14c212a59791f4b9e966cf5d180979e2
Parents: 5c84a39
Author: Rob Foley <ro...@gmail.com>
Authored: Wed Sep 21 14:56:24 2016 -0400
Committer: Rob Foley <ro...@gmail.com>
Committed: Wed Sep 21 14:56:24 2016 -0400

----------------------------------------------------------------------
 src/sendLogs.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/blob/89af0bbe/src/sendLogs.js
----------------------------------------------------------------------
diff --git a/src/sendLogs.js b/src/sendLogs.js
index 41c5798..c20ce67 100644
--- a/src/sendLogs.js
+++ b/src/sendLogs.js
@@ -18,11 +18,11 @@ export function initSender(logs, config) {
 }
 
 export function sendOnInterval(logs, config) {
-  setTimeout(function() {
-    if (logs.length >= config.logCountThreshold) {
-      var data = logs;
-      logs = [];
-      sendLogs(data, config.url, 5);
+  setInterval(function() {
+    var logCount = logs.length;
+    if (logCount >= config.logCountThreshold) {
+      sendLogs(logs.slice(0), config.url, 0); // Send a copy
+      logs.splice(0, logCount); // Clear array reference (no reassignment)
     }
   }, config.transmitInterval);
 }


[2/2] incubator-senssoft-useralejs git commit: Merge branch 'interval-fix'

Posted by rf...@apache.org.
Merge branch 'interval-fix'


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/505ca3b4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/tree/505ca3b4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/diff/505ca3b4

Branch: refs/heads/master
Commit: 505ca3b4181eaf4ffebff6309eacb28a87156b39
Parents: 3c1e0c1 89af0bb
Author: Rob Foley <ro...@gmail.com>
Authored: Wed Sep 21 15:01:37 2016 -0400
Committer: Rob Foley <ro...@gmail.com>
Committed: Wed Sep 21 15:01:37 2016 -0400

----------------------------------------------------------------------
 src/sendLogs.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/blob/505ca3b4/src/sendLogs.js
----------------------------------------------------------------------