Comparing version 0.2.9 to 0.2.10
var util = require("util"), | ||
dgram = require("dgram"); | ||
dgram = require("dgram"), | ||
setImmediate = require("./set-immediate"); | ||
@@ -19,3 +20,3 @@ // returns an emitter which sneds events one at a time to the given udp://host:port | ||
if (error) console.warn(error); | ||
if (queue.length) process.nextTick(send); | ||
if (queue.length) setImmediate(send); | ||
else if (closing) udp.close(); | ||
@@ -26,3 +27,3 @@ }); | ||
emitter.send = function(event) { | ||
if (!closing && queue.push(event) == 1) process.nextTick(send); | ||
if (!closing && queue.push(event) == 1) setImmediate(send); | ||
return emitter; | ||
@@ -29,0 +30,0 @@ }; |
@@ -7,3 +7,4 @@ // TODO use expression ids or hashes for more compact storage | ||
reduces = require("./reduces"), | ||
event = require("./event"); | ||
event = require("./event"), | ||
setImmediate = require("./set-immediate"); | ||
@@ -86,3 +87,3 @@ var metric_fields = {v: 1}, | ||
if (queue) queue.next = task; | ||
else process.nextTick(task); | ||
else setImmediate(task); | ||
queueByName[name] = task; | ||
@@ -95,3 +96,3 @@ | ||
callback(stop); | ||
if (task.next) process.nextTick(task.next); | ||
if (task.next) setImmediate(task.next); | ||
else delete queueByName[name]; | ||
@@ -98,0 +99,0 @@ |
{ | ||
"name": "cube", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "A system for analyzing time series data using MongoDB and Node.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
814327
19077