keuss 1.6.12 → 1.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Queue.js +3 -1
- package/TODO +0 -2
- package/examples/snippets/06-random-consumer-producer.js +5 -5
- package/package.json +1 -1
package/Queue.js
CHANGED
|
@@ -537,13 +537,15 @@ class Queue {
|
|
|
537
537
|
//////////////////////////////////
|
|
538
538
|
async.parallel ({
|
|
539
539
|
type: cb => cb (null, this.type()),
|
|
540
|
+
capabilities: cb => cb (null, this.capabilities ()),
|
|
541
|
+
factory: cb => cb (null, this._factory.to_descriptor_obj ()),
|
|
540
542
|
stats: cb => this.stats (cb),
|
|
541
543
|
paused: cb => this.paused (cb),
|
|
542
544
|
next_mature_t: cb => this.next_t (cb),
|
|
543
545
|
size: cb => this.size (cb),
|
|
544
546
|
totalSize: cb => this.totalSize (cb),
|
|
545
547
|
schedSize: cb => this.schedSize (cb),
|
|
546
|
-
resvSize: cb => this.resvSize (cb)
|
|
548
|
+
resvSize: cb => this.resvSize (cb)
|
|
547
549
|
}, cb);
|
|
548
550
|
}
|
|
549
551
|
|
package/TODO
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
bugs
|
|
2
2
|
-------------------------------------------------------------
|
|
3
|
-
* deadlettering on all backend but mongo-pipeline does not preserve hdrs
|
|
4
3
|
|
|
5
4
|
prio 1
|
|
6
5
|
-------------------------------------------------------------
|
|
@@ -10,7 +9,6 @@ prio 1
|
|
|
10
9
|
+ add some commonplace transforms (etl-like)
|
|
11
10
|
+ create a server for that, allow processor code defined externally
|
|
12
11
|
|
|
13
|
-
|
|
14
12
|
prio 0
|
|
15
13
|
-----------------------------------------------------------------
|
|
16
14
|
* bridges?
|
|
@@ -26,10 +26,10 @@ var factory_opts = {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
// test dimensions: elems to produce and consume, number of consumers, number of producers
|
|
29
|
-
const num_elems =
|
|
29
|
+
const num_elems = 1000000;
|
|
30
30
|
const num_producers = 3;
|
|
31
31
|
const num_consumers = 7;
|
|
32
|
-
const commit_likelihood =
|
|
32
|
+
const commit_likelihood = 75;
|
|
33
33
|
|
|
34
34
|
// stats holder
|
|
35
35
|
var selfs = {
|
|
@@ -223,12 +223,12 @@ MQ (factory_opts, function (err, factory) {
|
|
|
223
223
|
var q = factory.queue ('test_queue_456', q_opts);
|
|
224
224
|
|
|
225
225
|
var timer = setInterval (() => {
|
|
226
|
-
console.log ('**** state: %
|
|
226
|
+
console.log ('**** state: %o', _.map (shareds, (v, k) => {return {cnt: v.push_count || v.pop_count, max: v.push_max || v.pop_max }}));
|
|
227
227
|
|
|
228
228
|
console.log ('das pop %d, ko %d, ok %d', das_pop, das_ko, das_ok);
|
|
229
229
|
|
|
230
230
|
q.status ((err ,res) => {
|
|
231
|
-
console.log ('**** status: %
|
|
231
|
+
console.log ('**** status: %o', res);
|
|
232
232
|
});
|
|
233
233
|
}, 2000);
|
|
234
234
|
|
|
@@ -263,7 +263,7 @@ MQ (factory_opts, function (err, factory) {
|
|
|
263
263
|
clearInterval (timer);
|
|
264
264
|
|
|
265
265
|
q.status ((err ,res) => {
|
|
266
|
-
console.log ('**** status: %
|
|
266
|
+
console.log ('**** status: %o', res);
|
|
267
267
|
q.drain (() => factory.close ());
|
|
268
268
|
});
|
|
269
269
|
});
|