keuss 1.6.10 → 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/Pipeline/Queue.js +12 -2
- package/Queue.js +18 -8
- package/TODO +0 -1
- package/backends/bucket-mongo-safe.js +42 -44
- package/backends/bucket-mongo.js +6 -8
- package/examples/snippets/06-random-consumer-producer.js +5 -5
- package/package.json +6 -6
- package/test/backends_bucket-at-least-once.js +43 -35
- package/test/backends_deadletter.js +10 -1
- package/.nyc_output/ad035de4-a3d3-451b-b2ad-402e8ed517b8.json +0 -1
- package/.nyc_output/c8683d6c-e7e6-496b-ab0d-1ff730837d08.json +0 -1
- package/.nyc_output/processinfo/ad035de4-a3d3-451b-b2ad-402e8ed517b8.json +0 -1
- package/.nyc_output/processinfo/c8683d6c-e7e6-496b-ab0d-1ff730837d08.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -79
- package/coverage/index.html +0 -162
- package/coverage/keuss/Pipeline/BaseLink.js.html +0 -636
- package/coverage/keuss/Pipeline/Builder.js.html +0 -615
- package/coverage/keuss/Pipeline/ChoiceLink.js.html +0 -294
- package/coverage/keuss/Pipeline/DirectLink.js.html +0 -231
- package/coverage/keuss/Pipeline/Pipeline.js.html +0 -258
- package/coverage/keuss/Pipeline/Queue.js.html +0 -939
- package/coverage/keuss/Pipeline/Sink.js.html +0 -147
- package/coverage/keuss/Pipeline/index.html +0 -175
- package/coverage/keuss/QFactory-MongoDB-defaults.js.html +0 -219
- package/coverage/keuss/QFactory.js.html +0 -459
- package/coverage/keuss/Queue.js.html +0 -2274
- package/coverage/keuss/Signal.js.html +0 -312
- package/coverage/keuss/Stats.js.html +0 -174
- package/coverage/keuss/backends/bucket-mongo-safe.js.html +0 -2952
- package/coverage/keuss/backends/bucket-mongo.js.html +0 -1167
- package/coverage/keuss/backends/index.html +0 -175
- package/coverage/keuss/backends/mongo.js.html +0 -897
- package/coverage/keuss/backends/pl-mongo.js.html +0 -723
- package/coverage/keuss/backends/ps-mongo.js.html +0 -1038
- package/coverage/keuss/backends/redis-list.js.html +0 -513
- package/coverage/keuss/backends/redis-oq.js.html +0 -543
- package/coverage/keuss/bench/all-mongo.js.html +0 -393
- package/coverage/keuss/bench/index.html +0 -149
- package/coverage/keuss/bench/multi-q.js.html +0 -324
- package/coverage/keuss/bench/redis-oq-consumer-producer.js.html +0 -225
- package/coverage/keuss/bench/redis-oq-consumer.js.html +0 -189
- package/coverage/keuss/bench/redis-oq-producer.js.html +0 -198
- package/coverage/keuss/docusaurus/.docusaurus/client-modules.js.html +0 -93
- package/coverage/keuss/docusaurus/.docusaurus/docusaurus.config.js.html +0 -402
- package/coverage/keuss/docusaurus/.docusaurus/index.html +0 -136
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/01a85c17.4e57aa0a.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/09d5ad39.3009117f.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/1.12cf3eb8.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/12559443.a244228c.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/17896441.5efb3558.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/1be78505.f9c04817.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/2.4e2dc02c.js.html +0 -72
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/3.d549a05d.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/36.db0e809a.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/37637b3c.28c0900b.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/3d8d21df.2228b429.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/45a5cd1f.951da354.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/52c38f7a.785707bc.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/57ffbe3d.04d3e53e.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/5f7c35e9.2fa77599.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/6299bd84.ec197a3e.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/6875c492.cdf3e939.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/6beec1d2.6873e708.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/7b786ad4.bbce08e6.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/8070e160.400a4e57.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/88c93c54.e868a433.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/8d3e6f9e.aadf6d32.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/9bc74468.516633c5.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/9beb87c2.71e3744d.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/a3732fac.b0f98dbf.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/a6aa9e1f.6ac55e6c.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/baf0d4a2.b50efd2d.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/c4f5d8e4.e9dfd999.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/ccc49370.1831890b.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/d4942345.7d23b349.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/e2244795.4ea3d168.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/e64fe266.308265e8.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/f78725cc.5f3e115d.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/fa8d8063.2312a332.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/index.html +0 -565
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/main.66f1008c.js.html +0 -72
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/runtime~main.7d73b048.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/styles.b5ee3016.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/registry.js.html +0 -165
- package/coverage/keuss/docusaurus/.docusaurus/routes.js.html +0 -447
- package/coverage/keuss/docusaurus/build/01a85c17.4e57aa0a.js.html +0 -69
- package/coverage/keuss/docusaurus/build/09d5ad39.3009117f.js.html +0 -69
- package/coverage/keuss/docusaurus/build/1.12cf3eb8.js.html +0 -69
- package/coverage/keuss/docusaurus/build/12559443.a244228c.js.html +0 -69
- package/coverage/keuss/docusaurus/build/17896441.5efb3558.js.html +0 -69
- package/coverage/keuss/docusaurus/build/1be78505.f9c04817.js.html +0 -69
- package/coverage/keuss/docusaurus/build/2.4e2dc02c.js.html +0 -72
- package/coverage/keuss/docusaurus/build/3.d549a05d.js.html +0 -69
- package/coverage/keuss/docusaurus/build/36.db0e809a.js.html +0 -69
- package/coverage/keuss/docusaurus/build/37637b3c.28c0900b.js.html +0 -69
- package/coverage/keuss/docusaurus/build/3d8d21df.2228b429.js.html +0 -69
- package/coverage/keuss/docusaurus/build/45a5cd1f.951da354.js.html +0 -69
- package/coverage/keuss/docusaurus/build/52c38f7a.785707bc.js.html +0 -69
- package/coverage/keuss/docusaurus/build/57ffbe3d.04d3e53e.js.html +0 -69
- package/coverage/keuss/docusaurus/build/5f7c35e9.2fa77599.js.html +0 -69
- package/coverage/keuss/docusaurus/build/6299bd84.ec197a3e.js.html +0 -69
- package/coverage/keuss/docusaurus/build/6875c492.cdf3e939.js.html +0 -69
- package/coverage/keuss/docusaurus/build/6beec1d2.6873e708.js.html +0 -69
- package/coverage/keuss/docusaurus/build/7b786ad4.bbce08e6.js.html +0 -69
- package/coverage/keuss/docusaurus/build/8070e160.400a4e57.js.html +0 -69
- package/coverage/keuss/docusaurus/build/88c93c54.e868a433.js.html +0 -69
- package/coverage/keuss/docusaurus/build/8d3e6f9e.aadf6d32.js.html +0 -69
- package/coverage/keuss/docusaurus/build/9bc74468.516633c5.js.html +0 -69
- package/coverage/keuss/docusaurus/build/9beb87c2.71e3744d.js.html +0 -69
- package/coverage/keuss/docusaurus/build/a3732fac.b0f98dbf.js.html +0 -69
- package/coverage/keuss/docusaurus/build/a6aa9e1f.6ac55e6c.js.html +0 -69
- package/coverage/keuss/docusaurus/build/baf0d4a2.b50efd2d.js.html +0 -69
- package/coverage/keuss/docusaurus/build/c4f5d8e4.e9dfd999.js.html +0 -69
- package/coverage/keuss/docusaurus/build/ccc49370.1831890b.js.html +0 -69
- package/coverage/keuss/docusaurus/build/d4942345.7d23b349.js.html +0 -69
- package/coverage/keuss/docusaurus/build/e2244795.4ea3d168.js.html +0 -69
- package/coverage/keuss/docusaurus/build/e64fe266.308265e8.js.html +0 -69
- package/coverage/keuss/docusaurus/build/f78725cc.5f3e115d.js.html +0 -69
- package/coverage/keuss/docusaurus/build/fa8d8063.2312a332.js.html +0 -69
- package/coverage/keuss/docusaurus/build/index.html +0 -565
- package/coverage/keuss/docusaurus/build/main.66f1008c.js.html +0 -72
- package/coverage/keuss/docusaurus/build/runtime~main.7d73b048.js.html +0 -69
- package/coverage/keuss/docusaurus/build/styles.b5ee3016.js.html +0 -69
- package/coverage/keuss/docusaurus/docusaurus.config.js.html +0 -360
- package/coverage/keuss/docusaurus/index.html +0 -110
- package/coverage/keuss/docusaurus/sidebars.js.html +0 -96
- package/coverage/keuss/docusaurus/src/pages/index.html +0 -97
- package/coverage/keuss/docusaurus/src/pages/index.js.html +0 -450
- package/coverage/keuss/examples/pipelines/builder/index.html +0 -97
- package/coverage/keuss/examples/pipelines/builder/index.js.html +0 -450
- package/coverage/keuss/examples/pipelines/simplest/index.html +0 -97
- package/coverage/keuss/examples/pipelines/simplest/index.js.html +0 -183
- package/coverage/keuss/examples/pipelines/simulation-fork/index.html +0 -97
- package/coverage/keuss/examples/pipelines/simulation-fork/index.js.html +0 -414
- package/coverage/keuss/examples/snippets/01-simplest-pop-push.js.html +0 -195
- package/coverage/keuss/examples/snippets/02-simplest-reserve-rollback-commit.js.html +0 -201
- package/coverage/keuss/examples/snippets/03-simplest-producer-consumer-loops.js.html +0 -300
- package/coverage/keuss/examples/snippets/04-bucket-mongo-safe-insert-reserve-commit.js.html +0 -303
- package/coverage/keuss/examples/snippets/05-insert-reserve-rollback-deadletter.js.html +0 -384
- package/coverage/keuss/examples/snippets/06-random-consumer-producer.js.html +0 -879
- package/coverage/keuss/examples/snippets/index.html +0 -188
- package/coverage/keuss/examples/snippets/redislabs-consumer-producer.js.html +0 -201
- package/coverage/keuss/examples/snippets/with-redis-stats-and-signaller-consumer-producer.js.html +0 -222
- package/coverage/keuss/examples/webhooks/app.js.html +0 -279
- package/coverage/keuss/examples/webhooks/consumer.js.html +0 -363
- package/coverage/keuss/examples/webhooks/index.html +0 -123
- package/coverage/keuss/examples/webhooks/index.js.html +0 -234
- package/coverage/keuss/index.html +0 -149
- package/coverage/keuss/playground/index.html +0 -136
- package/coverage/keuss/playground/pl-rollback.js.html +0 -234
- package/coverage/keuss/playground/pl1.js.html +0 -291
- package/coverage/keuss/playground/q1.js.html +0 -168
- package/coverage/keuss/playground/simple-pl.js.html +0 -195
- package/coverage/keuss/signal/index.html +0 -123
- package/coverage/keuss/signal/local.js.html +0 -306
- package/coverage/keuss/signal/mongo-capped.js.html +0 -378
- package/coverage/keuss/signal/redis-pubsub.js.html +0 -399
- package/coverage/keuss/stats/index.html +0 -123
- package/coverage/keuss/stats/mem.js.html +0 -519
- package/coverage/keuss/stats/mongo.js.html +0 -930
- package/coverage/keuss/stats/redis.js.html +0 -894
- package/coverage/keuss/utils/RedisConn.js.html +0 -150
- package/coverage/keuss/utils/RedisOrderedQueue.js.html +0 -864
- package/coverage/keuss/utils/index.html +0 -110
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -170
- package/docusaurus/README.md +0 -33
- package/docusaurus/babel.config.js +0 -3
- package/docusaurus/blog/2020-08-04-welcome.md +0 -10
- package/docusaurus/docs/about.md +0 -14
- package/docusaurus/docs/api/factory.md +0 -102
- package/docusaurus/docs/api/queue.md +0 -247
- package/docusaurus/docs/api/signal.md +0 -38
- package/docusaurus/docs/api/stats.md +0 -37
- package/docusaurus/docs/changelog.md +0 -51
- package/docusaurus/docs/concepts.md +0 -116
- package/docusaurus/docs/examples.md +0 -10
- package/docusaurus/docs/quickstart.md +0 -195
- package/docusaurus/docs/style-guide.md +0 -202
- package/docusaurus/docs/usage/buckets.md +0 -43
- package/docusaurus/docs/usage/no-signaller.md +0 -16
- package/docusaurus/docs/usage/pipelines/about.md +0 -128
- package/docusaurus/docs/usage/pipelines/building.md +0 -158
- package/docusaurus/docs/usage/pipelines/examples.md +0 -10
- package/docusaurus/docs/usage/pipelines/processors.md +0 -187
- package/docusaurus/docs/usage/putting-all-together.md +0 -153
- package/docusaurus/docs/usage/redis-conns.md +0 -70
- package/docusaurus/docs/usage/shutdown.md +0 -11
- package/docusaurus/docusaurus.config.js +0 -96
- package/docusaurus/package.json +0 -33
- package/docusaurus/sidebars.js +0 -44
- package/docusaurus/src/css/custom.css +0 -25
- package/docusaurus/src/pages/index.js +0 -127
- package/docusaurus/src/pages/styles.module.css +0 -37
- package/docusaurus/static/.nojekyll +0 -0
- package/docusaurus/static/img/favicon.ico +0 -0
- package/docusaurus/static/img/logo.svg +0 -1
- package/docusaurus/yarn.lock +0 -8384
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Code coverage report for keuss/docusaurus/.docusaurus/keuss-gh-pages/57ffbe3d.04d3e53e.js</title>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<link rel="stylesheet" href="../../../../prettify.css" />
|
|
7
|
-
<link rel="stylesheet" href="../../../../base.css" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<style type='text/css'>
|
|
10
|
-
.coverage-summary .sorter {
|
|
11
|
-
background-image: url(../../../../sort-arrow-sprite.png);
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<div class='wrapper'>
|
|
17
|
-
<div class='pad1'>
|
|
18
|
-
<h1>
|
|
19
|
-
<a href="../../../../index.html">All files</a> / <a href="index.html">keuss/docusaurus/.docusaurus/keuss-gh-pages</a> 57ffbe3d.04d3e53e.js
|
|
20
|
-
</h1>
|
|
21
|
-
<div class='clearfix'>
|
|
22
|
-
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">0% </span>
|
|
24
|
-
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>0/88</span>
|
|
26
|
-
</div>
|
|
27
|
-
<div class='fl pad1y space-right2'>
|
|
28
|
-
<span class="strong">0% </span>
|
|
29
|
-
<span class="quiet">Branches</span>
|
|
30
|
-
<span class='fraction'>0/45</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Functions</span>
|
|
35
|
-
<span class='fraction'>0/22</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">0% </span>
|
|
39
|
-
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>0/1</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<p class="quiet">
|
|
44
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
<div class='status-line low'></div>
|
|
48
|
-
<pre><table class="coverage">
|
|
49
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{67:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,n){"use strict";<span class="cstat-no" title="statement not covered" >n.r(t),n.d(t,"frontMatter",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return o}</span>)),n.d(t,"metadata",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return l}</span>)),n.d(t,"rightToc",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return s}</span>)),n.d(t,"default",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return p}</span>));v</span>ar i=<span class="cstat-no" title="statement not covered" >n(2),</span>a=<span class="cstat-no" title="statement not covered" >n(6),</span>r=(<span class="cstat-no" title="statement not covered" >n(0),n(91))</span>,o=<span class="cstat-no" title="statement not covered" >{id:"pipelines",title:"Pipelines",sidebar_label:"Pipelines"},</span>l=<span class="cstat-no" title="statement not covered" >{unversionedId:"usage/pipelines",id:"usage/pipelines",isDocsHomePage:!1,title:"Pipelines",description:"True atomic ETL-like queues and processors.",source:"@site/docs/usage/pipelines.md",permalink:"/keuss/docs/usage/pipelines",editUrl:"https://github.com/pepmartinez/keuss/edit/master/website/docs/usage/pipelines.md",sidebar_label:"Pipelines",sidebar:"someSidebar",previous:{title:"Redis Connections",permalink:"/keuss/docs/usage/redis-conns"},next:{title:"Factory API",permalink:"/keuss/docs/api/factory"}},</span>s=<span class="cstat-no" title="statement not covered" >[{value:"BaseLink",id:"baselink",children:[{value:"Creation",id:"creation",children:[]},{value:"Methods",id:"methods",children:[]},{value:"Process Function",id:"process-function",children:[]},{value:"Events",id:"events",children:[]}]},{value:"DirectLink",id:"directlink",children:[{value:"Creation",id:"creation-1",children:[]},{value:"Methods",id:"methods-1",children:[]},{value:"Process Function",id:"process-function-1",children:[]}]},{value:"ChoiceLink",id:"choicelink",children:[{value:"Creation",id:"creation-2",children:[]},{value:"Methods",id:"methods-2",children:[]},{value:"Process Function",id:"process-function-2",children:[]}]},{value:"Sink",id:"sink",children:[{value:"Creation",id:"creation-3",children:[]},{value:"Methods",id:"methods-3",children:[]},{value:"Process Function",id:"process-function-3",children:[]}]}],</span>c=<span class="cstat-no" title="statement not covered" >{rightToc:s};</span>function <span class="fstat-no" title="function not covered" >p(</span>e){var t=<span class="cstat-no" title="statement not covered" >e.components,</span>n=<span class="cstat-no" title="statement not covered" >Object(a.a)(e,["components"]);<span class="cstat-no" title="statement not covered" ></span>return Object(r.b)("wrapper",Object(i.a)({},c,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("p",null,"True atomic ",Object(r.b)("a",Object(i.a)({parentName:"p"},{href:"https://en.wikipedia.org/wiki/Extract,_transform,_load"}),"ETL-like")," queues and processors."),Object(r.b)("h1",{id:"about"},"About"),Object(r.b)("p",null,"Pipelines is a Keuss extension for building ",Object(r.b)("a",Object(i.a)({parentName:"p"},{href:"https://en.wikipedia.org/wiki/Extract,_transform,_load"}),"ETL")," processing graphs with ease while guaranteeing atomicity in the processing: whatever happens at the processing of an element, the element is guaranteed to be in either the source or in the destination queue; never in both, never in none."),Object(r.b)("p",null,"Keuss pipelines are build upon Keuss Queues with ",Object(r.b)("em",{parentName:"p"},"pipeline")," capacity, which means Pipelines inherit all their advantages in terms of HA, durability and performance. So far, Keuss offers only one Queue backend with pipeline capacity, ",Object(r.b)("inlineCode",{parentName:"p"},"pl-mongo")),Object(r.b)("p",null,"Queues are linked together with processing units named ",Object(r.b)("em",{parentName:"p"},"Processors"),", which glue together a source queue with zero or more destination queues. Each processor encapsulates a loop that could be described -in its simplest form- as follows:"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-javascript"}),"forever do\n src_queue.reserve () -> element # reserve an element from entry queue\n process (element) -> err, res # process the element\n\n if (err) then\n if (err.drop) do # error tells processor to drop/ignore the element\n src_queue.commit (element)\n else do\n src_queue.rollback (element) # regular error, rollback. It would be retried\n end\n else\n if (res.drop) do # processed ok, but drop the item anyway\n src_queue.commit (element)\n else do\n # commit on entry queue and insert into the exit queue, all in one atomic operation\n # modifications in the payload are conserved\n move_to_next_queue (element, src_queue)\n end\n end\n\n next_loop\nend\n")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"The ",Object(r.b)("inlineCode",{parentName:"li"},"process()")," part is user-provided, passed as a function on the initialization of the processor"),Object(r.b)("li",{parentName:"ul"},"The exact semantics of ",Object(r.b)("inlineCode",{parentName:"li"},"move_to_next_queue()")," vary depending on the specific type of Processor chosen")),Object(r.b)("h1",{id:"real-simple-example"},"Real, simple example"),Object(r.b)("p",null,"Here is the simplest possible example: 2 queues connected with a very simple processor. Elements in the source queue are taken, a ",Object(r.b)("inlineCode",{parentName:"p"},"passed: true")," is added to them and moved to the next queue:"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-javascript"}),"const MQ = require ('keuss/backends/pl-mongo');\nconst PDL = require ('keuss/Pipeline/DirectLink');\nconst async = require ('async');\n\nconst factory_opts = {\n url: 'mongodb://localhost/qeus'\n};\n\n// initialize factory\nMQ (factory_opts, (err, factory) => {\n if (err) return console.error (err);\n\n // factory ready, create 2 queues on default pipeline\n const q_opts = {};\n const q1 = factory.queue ('test_pl_1', q_opts);\n const q2 = factory.queue ('test_pl_2', q_opts);\n\n // tie them up, q1 -> q2\n const pdl = new PDL (q1, q2);\n\n pdl.start ((elem, done) => {\n // pass element to next queue, set payload.passed to true\n done (null, {\n update: {\n $set: {passed: true}\n }\n });\n });\n\n // insert elements in the entry queue\n async.timesLimit (111, 3, (n, next) => q1.push ({a:n, b:'see it spin...'}, next));\n\n // read elements at the outer end\n async.timesLimit (111, 3, (n, next) => q2.pop ('exit', (err, res) => {\n console.log ('end point get', res);\n next ();\n }));\n});\n")),Object(r.b)("p",null,"just run this example and you'll see 111 elements being inserted at q1, being processed at the pdl processor, and then popped from q2"),Object(r.b)("h1",{id:"pipeline-aware-queues"},"Pipeline-aware Queues"),Object(r.b)("p",null,"As stated before only one Keuss Queue backed -",Object(r.b)("inlineCode",{parentName:"p"},"pl-mongo"),"- is compatible with pipelines. Those are the pipeline-related options available at the backend:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"pipeline"),": specifies the pipeline name for this queue. Only queues within the same pipeline (that is, same mongodb url and same pipeline name) can actually work together in a pipeline. Defaults to ",Object(r.b)("inlineCode",{parentName:"li"},"default"))),Object(r.b)("p",null,"In the above example both queues q1 and q2 are created in a pipeline named 'default'. To use a different one you just change the code into:"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-javascript"}),"const q_opts = {pipeline: 'some_other_pipeline'};\nconst q1 = factory.queue ('test_pl_1', q_opts);\nconst q2 = factory.queue ('test_pl_2', q_opts);\n")),Object(r.b)("p",null,"Also, pipeline-aware queues provide a new operation:"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-javascript"}),"pl_step (id, next_queue, opts, callback)\n")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"id")," is a previously reserved Id"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"next_queue")," is the queue to (atomically) move the item to"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"opts")," are extra options for the operation:",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"mature"),": Date instance with the not-before timestamp for the item, to be used when inserted into ",Object(r.b)("inlineCode",{parentName:"li"},"next_queue"),". Defaults to ",Object(r.b)("inlineCode",{parentName:"li"},"now()")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"tries"),": number of tries for the item, to be used when inserted into next_queue. Defaults to ",Object(r.b)("inlineCode",{parentName:"li"},"0")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"payload"),": if specified, use this as item's payload when moving to next_queue. This totally substitutes the previous payload"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"update"),": Optional object containing ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://docs.mongodb.com/manual/reference/operator/update/"}),"mongodb update operations"),". Those are mapped to be applied to the message's ",Object(r.b)("inlineCode",{parentName:"li"},"payload"),". For example, in the example above:",Object(r.b)("pre",{parentName:"li"},Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-javascript"}),"done (null, {\n update: {\n $set: {passed: true}\n }\n});\n")),"the '",Object(r.b)("inlineCode",{parentName:"li"},"update")," parameter of the second argument to ",Object(r.b)("inlineCode",{parentName:"li"},"done()")," is passed internally to ",Object(r.b)("inlineCode",{parentName:"li"},"pl_step()")," as ",Object(r.b)("inlineCode",{parentName:"li"},"opts.update"),": this would cause the message's ",Object(r.b)("inlineCode",{parentName:"li"},"payload.passed")," to be set to ",Object(r.b)("inlineCode",{parentName:"li"},"true")," even if there's no explicit mention of ",Object(r.b)("inlineCode",{parentName:"li"},"payload"))))),Object(r.b)("p",null,"The whole ",Object(r.b)("inlineCode",{parentName:"p"},"pl_step()")," operation is guaranteed to be atomic; this includes applying of ",Object(r.b)("inlineCode",{parentName:"p"},"opts.payload")," or ",Object(r.b)("inlineCode",{parentName:"p"},"opts.update")," if present"),Object(r.b)("p",null,"Also, ",Object(r.b)("inlineCode",{parentName:"p"},"opts.payload")," takes precedence over ",Object(r.b)("inlineCode",{parentName:"p"},"opts.update"),": if both are specified only the former is taken into account, and the latter is totally ignored"),Object(r.b)("h1",{id:"processors"},"Processors"),Object(r.b)("p",null,"A small hierarchy of processors is provided with Pipelines:"),Object(r.b)("h2",{id:"baselink"},"BaseLink"),Object(r.b)("p",null,"Common base for all Processors, provides all the functionality common to all. It can not be used directly"),Object(r.b)("h3",{id:"creation"},"Creation"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-javascript"}),"const bl = new BaseLink (src_q, opts)\n")),Object(r.b)("p",null,"Although not intended to be instantiated, this serves as common initialization to all Processors"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("inlineCode",{parentName:"p"},"src_q")," must be a pipelined queue")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("inlineCode",{parentName:"p"},"opts")," can contain:"),Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("inlineCode",{parentName:"p"},"retry_factor_t, retry_base_t"),": they control the delay imposed to an element when it is rolled back. The formula is"),Object(r.b)("p",{parentName:"li"},Object(r.b)("inlineCode",{parentName:"p"},"delay-in-seconds = item.tries * retry_factor_t + retry_base_t")),Object(r.b)("p",{parentName:"li"},"They default to ",Object(r.b)("inlineCode",{parentName:"p"},"2")," and ",Object(r.b)("inlineCode",{parentName:"p"},"1")," respectively")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("inlineCode",{parentName:"p"},"mature"),": Date instance or unix timestamp (in milliseconds, as integer) expressing the not-before timestamp for the item, to be used when calling ",Object(r.b)("inlineCode",{parentName:"p"},"pl_step()")," in the src queue")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("inlineCode",{parentName:"p"},"delay"),": delay in seconds to calculate ",Object(r.b)("inlineCode",{parentName:"p"},"mature"),", if ",Object(r.b)("inlineCode",{parentName:"p"},"mature")," is not specified"))))),Object(r.b)("h3",{id:"methods"},"Methods"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"src()"),": returns src queue"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"name()"),": returns Processor name"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"on_data(fn)"),": specifies the process function to be applied to each element"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"start(fn)"),": starts the processor. Optionally, a process function can be passed; if not passed the process function must have been previously specified using ",Object(r.b)("inlineCode",{parentName:"li"},"on_data()")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"stop()"),": stops the Processor")),Object(r.b)("h3",{id:"process-function"},"Process Function"),Object(r.b)("p",null,"The function passed into ",Object(r.b)("inlineCode",{parentName:"p"},"on_data()")," or ",Object(r.b)("inlineCode",{parentName:"p"},"start()")," provides the processor logic; this function is referred to as ",Object(r.b)("em",{parentName:"p"},"processor function"),". This function is called on each step of the Processor loop with the reserved item, and it is expected to calls its callback once done with the item. The way the function calls the callback determines what happens with the item afterwards"),Object(r.b)("p",null,"The function looks like this:"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-javascript"}),"function (item, cb) {\n ...\n})\n")),Object(r.b)("p",null,"The ",Object(r.b)("inlineCode",{parentName:"p"},"item")," is received exactly as it comes as result of a (successful) ",Object(r.b)("inlineCode",{parentName:"p"},"reserve()")," call on the source queue; after processing the item ",Object(r.b)("inlineCode",{parentName:"p"},"cb")," should be called once to finish the processing of ",Object(r.b)("inlineCode",{parentName:"p"},"item")," and proceed with the next loop cycle. The callback has the following signature:"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-javascript"})," cb (err, res);\n")),Object(r.b)("p",null,"where:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"if ",Object(r.b)("inlineCode",{parentName:"p"},"err")," is not nil"),Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"if ",Object(r.b)("inlineCode",{parentName:"li"},"err.drop")," is exactly ",Object(r.b)("inlineCode",{parentName:"li"},"true")," the item is committed in the src queue and therefore dropped from the pipeline"),Object(r.b)("li",{parentName:"ul"},"else the item is rolled back in the src queue, using the processor's ",Object(r.b)("inlineCode",{parentName:"li"},"retry_factor_t")," and ",Object(r.b)("inlineCode",{parentName:"li"},"retry_base_t")," to calculate the retry delay. If the queue was created with deadletter support, the item would be moved to the deadletter queue if it has reached its maximum number of rollbacks; in such case, the movement into deadletter is also atomic"))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"else (if ",Object(r.b)("inlineCode",{parentName:"p"},"err")," is nill)"),Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"if (",Object(r.b)("inlineCode",{parentName:"li"},"res.drop")," is exactly ",Object(r.b)("inlineCode",{parentName:"li"},"true")," the item is committed in the src queue and therefore dropped from the pipeline"),Object(r.b)("li",{parentName:"ul"},"else the item is passed to the text queue in the pipeline (by means of ",Object(r.b)("inlineCode",{parentName:"li"},"pl_next()"),")",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"if ",Object(r.b)("inlineCode",{parentName:"li"},"res.mature")," or ",Object(r.b)("inlineCode",{parentName:"li"},"res.delay")," exist (or they were specified at the processor's creation) they are used to calculate the delay/mature of the element in the destination queue"),Object(r.b)("li",{parentName:"ul"},"if ",Object(r.b)("inlineCode",{parentName:"li"},"res.payload")," exists it is used to replace the item's payload entirely"),Object(r.b)("li",{parentName:"ul"},"else if ",Object(r.b)("inlineCode",{parentName:"li"},"res.update")," exists it is used as mongodb-update operations on the item's payload")))),Object(r.b)("p",{parentName:"li"},"All those operations happen in an atomic way"))),Object(r.b)("h4",{id:"semantic-this-in-process-function"},"Semantic ",Object(r.b)("inlineCode",{parentName:"h4"},"this")," in process function"),Object(r.b)("p",null,"The function is bound to the processor, so the function can access and use processor's primitives. For example, it can insert copies of the item, or new items, in any of the source or destination queues"),Object(r.b)("p",null,"In order to use this functionality the process function can not be declared as an 'arrow' function, since those can not be bound. Use the classic ",Object(r.b)("inlineCode",{parentName:"p"},"function xxxx (item, cb) {...}")," if you intend to access the underlying Processor"),Object(r.b)("h3",{id:"events"},"Events"),Object(r.b)("p",null,"BaseLink inherits from ",Object(r.b)("inlineCode",{parentName:"p"},"EventEmitter")," and publishes the following events:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"error"),": an error happened in the internal loop. It comes with one parameter, an object with the following fields:",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"on"),": exact type of error:",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"src-queue-pop"),": error while reserving an element on the src queue"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"src-queue-commit-on-error"),": error while committing an element on the src queue when an error was passed and ",Object(r.b)("inlineCode",{parentName:"li"},"err.drop==true")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"src-queue-rollback-on-error"),": error while rolling back an element on the src queue when an error was passed"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"src-queue-commit-on-drop"),": error while committing an element an element on the src queue when processed ok and ",Object(r.b)("inlineCode",{parentName:"li"},"res.drop==true")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"next-queue"),": error while atomically moving the element to the next queue"))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"elem"),": element that caused the error. Not present in ",Object(r.b)("inlineCode",{parentName:"li"},"src-queue-pop")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"error"),": original error object"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"opts"),": (only present in ",Object(r.b)("inlineCode",{parentName:"li"},"next-queue"),") options passed internally to ",Object(r.b)("inlineCode",{parentName:"li"},"pl_step()"))))),Object(r.b)("h2",{id:"directlink"},"DirectLink"),Object(r.b)("p",null,"Processor that connects the source queue to exactly one destination queue:"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{})," src-queue --\x3e DirectLink --\x3e dst-queue\n")),Object(r.b)("h3",{id:"creation-1"},"Creation"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-javascript"}),"const PDL = require ('keuss/Pipeline/DirectLink');\nconst bl = new PDL (src_q, dst_q, opts);\n")),Object(r.b)("p",null,"In addition to ",Object(r.b)("inlineCode",{parentName:"p"},"BaseLink"),":"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"dst_q")," must be a pipelined queue; also, both ",Object(r.b)("inlineCode",{parentName:"li"},"src_q")," and ",Object(r.b)("inlineCode",{parentName:"li"},"dst_q")," must be of the same type and must belong to the same pipeline")),Object(r.b)("h3",{id:"methods-1"},"Methods"),Object(r.b)("p",null,"In addition to those of ",Object(r.b)("inlineCode",{parentName:"p"},"BaseLink")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"dst()"),": returns destination queue")),Object(r.b)("h3",{id:"process-function-1"},"Process Function"),Object(r.b)("p",null,"In the case of successful processing (i.e.: no ",Object(r.b)("inlineCode",{parentName:"p"},"err")," in the callback invocation) the item is atomically moved to the ",Object(r.b)("inlineCode",{parentName:"p"},"dst")," queue."),Object(r.b)("p",null,"No other semantics are added to the process function."),Object(r.b)("h2",{id:"choicelink"},"ChoiceLink"),Object(r.b)("p",null,"Processor that connects the source queue to an array of queues; after processing, each item would be moved to exactly one of those queues:"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{})," |--\x3e dst-queue-0\n |--\x3e dst-queue-1\n src-queue --\x3e ChoiceLink --|--\x3e dst-queue-2\n | ...\n |--\x3e dst-queue-n\n")),Object(r.b)("h3",{id:"creation-2"},"Creation"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-javascript"}),"const PCL = require ('keuss/Pipeline/ChoiceLink');\nconst cl = new PCL (src_q, array_of_dst_queues, opts);\n")),Object(r.b)("p",null,"In addition to ",Object(r.b)("inlineCode",{parentName:"p"},"BaseLink"),":"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"array_of_dst_queues")," must be an array of pipelined queues; each one must be of the same type and must belong to the same pipeline than ",Object(r.b)("inlineCode",{parentName:"li"},"src_q"))),Object(r.b)("h3",{id:"methods-2"},"Methods"),Object(r.b)("p",null,"In addition to those of ",Object(r.b)("inlineCode",{parentName:"p"},"BaseLink")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"dst_by_idx(idx)"),": returns destination queue from the array, selected by array index (integer)"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"dst_by_name(name)"),": returns destination queue from the array, selected by queue name (string)"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"dst_dimension ()"),": returns number of possible destination queues"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"dst_names ()"),": returns an array with the names of all dst queues")),Object(r.b)("h3",{id:"process-function-2"},"Process Function"),Object(r.b)("p",null,"ChoiceLink expects an ",Object(r.b)("inlineCode",{parentName:"p"},"res.dst")," in the callback invocation, which must fullfill one of those conditions:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"be an integer and resolve to a valid element when applied as index to the array of destination queues"),Object(r.b)("li",{parentName:"ul"},"be a string and correspond to the name of one of the destination queues")),Object(r.b)("p",null,"The element will be moved atomically to the specified destination queue upon successful processing (i.e.: no ",Object(r.b)("inlineCode",{parentName:"p"},"err"),"in the callback invocation)"),Object(r.b)("h2",{id:"sink"},"Sink"),Object(r.b)("p",null,"Processor that connects the source queue to exactly zero destination queue. That is, a termination point: successfully processed elements are always removed from the pipeline"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{})," src-queue --\x3e Sink\n")),Object(r.b)("h3",{id:"creation-3"},"Creation"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-javascript"}),"const PS = require ('keuss/Pipeline/Sink');\nconst bl = new PS (src_q, opts);\n")),Object(r.b)("p",null,"No extra parameters are expected in addition to those of ",Object(r.b)("inlineCode",{parentName:"p"},"BaseLink")),Object(r.b)("h3",{id:"methods-3"},"Methods"),Object(r.b)("p",null,"No extra methods are provided in addition to those of ",Object(r.b)("inlineCode",{parentName:"p"},"BaseLink")),Object(r.b)("h3",{id:"process-function-3"},"Process Function"),Object(r.b)("p",null,"In the case of successful processing (i.e.: no ",Object(r.b)("inlineCode",{parentName:"p"},"err")," in the callback invocation) the item is removed from the pipeline, exactly as if ",Object(r.b)("inlineCode",{parentName:"p"},"res.drop")," were specified. Actually, ",Object(r.b)("inlineCode",{parentName:"p"},"res")," is totally ignored"),Object(r.b)("h1",{id:"examples"},"Examples"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://github.com/pepmartinez/keuss/tree/master/examples/pipelines/simplest"}),"simplest"),": a very simple pipeline with just 2 queues connected with a DirectLink"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://github.com/pepmartinez/keuss/tree/master/examples/pipelines/simulation-fork"}),"simulation-fork"),": a somewhat complete example with ",Object(r.b)("inlineCode",{parentName:"li"},"DirectLink"),", ",Object(r.b)("inlineCode",{parentName:"li"},"ChoiceLink")," and ",Object(r.b)("inlineCode",{parentName:"li"},"Sink")," instances connecting 5 queues in a fork-like flow. Each process function adds some basic simulated processing with payload updates, random failures and random delays. It also uses deadletter"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://github.com/pepmartinez/keuss/tree/master/examples/pipelines/builder"}),"builder"),": variant of ",Object(r.b)("inlineCode",{parentName:"li"},"simulation-fork")," done with a pipeline builder")))}<span class="cstat-no" title="statement not covered" ></span>p.isMDXComponent=!0}</span>,91:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,n){"use strict";<span class="cstat-no" title="statement not covered" >n.d(t,"a",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return b}</span>)),n.d(t,"b",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return m}</span>));v</span>ar i=<span class="cstat-no" title="statement not covered" >n(0),</span>a=<span class="cstat-no" title="statement not covered" >n.n(i);</span>function <span class="fstat-no" title="function not covered" >r(</span>e,t,n){<span class="cstat-no" title="statement not covered" >return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}</span>function <span class="fstat-no" title="function not covered" >o(</span>e,t){var n=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var i=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>t&&(i=i.filter((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >return Object.getOwnPropertyDescriptor(e,t).enumerable}</span>))),n.push.apply(n,i)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn n}</span>function <span class="fstat-no" title="function not covered" >l(</span>e){<span class="cstat-no" title="statement not covered" >for(var t=<span class="cstat-no" title="statement not covered" >1;</span>t<arguments.length;t++){var n=<span class="cstat-no" title="statement not covered" >null!=arguments[t]?arguments[t]:{};<span class="cstat-no" title="statement not covered" ></span>t%2?o(Object(n),!0).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >r(e,t,n[t])}</span>)):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}</span>))}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn e}</span>function <span class="fstat-no" title="function not covered" >s(</span>e,t){<span class="cstat-no" title="statement not covered" >if(null==e)<span class="cstat-no" title="statement not covered" >return{};v</span></span>ar n,i,a=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e,t){<span class="cstat-no" title="statement not covered" >if(null==e)<span class="cstat-no" title="statement not covered" >return{};v</span></span>ar n,i,a=<span class="cstat-no" title="statement not covered" >{},</span>r=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>for(i=0;i<r.length;i++)<span class="cstat-no" title="statement not covered" >n=r[i],t.indexOf(n)>=0||(a[n]=e[n]);<span class="cstat-no" title="statement not covered" >r</span></span>eturn a}</span>(e,t);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var r=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>for(i=0;i<r.length;i++)<span class="cstat-no" title="statement not covered" >n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}<span class="cstat-no" title="statement not covered" ></span></span>r</span>eturn a}</span>var c=<span class="cstat-no" title="statement not covered" >a.a.createContext({}),</span>p=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >a.a.useContext(c),</span>n=<span class="cstat-no" title="statement not covered" >t;<span class="cstat-no" title="statement not covered" ></span>return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n}</span>,</span>b=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >p(e.components);<span class="cstat-no" title="statement not covered" ></span>return a.a.createElement(c.Provider,{value:t},e.children)}</span>,</span>u=<span class="cstat-no" title="statement not covered" >{inlineCode:"code",wrapper:<span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >e.children;<span class="cstat-no" title="statement not covered" ></span>return a.a.createElement(a.a.Fragment,{},t)}</span>},</span>d=<span class="cstat-no" title="statement not covered" >a.a.forwardRef((<span class="fstat-no" title="function not covered" >fu</span>nction(e,t){var n=<span class="cstat-no" title="statement not covered" >e.components,</span>i=<span class="cstat-no" title="statement not covered" >e.mdxType,</span>r=<span class="cstat-no" title="statement not covered" >e.originalType,</span>o=<span class="cstat-no" title="statement not covered" >e.parentName,</span>c=<span class="cstat-no" title="statement not covered" >s(e,["components","mdxType","originalType","parentName"]),</span>b=<span class="cstat-no" title="statement not covered" >p(n),</span>d=<span class="cstat-no" title="statement not covered" >i,</span>m=<span class="cstat-no" title="statement not covered" >b["".concat(o,".").concat(d)]||b[d]||u[d]||r;<span class="cstat-no" title="statement not covered" ></span>return n?a.a.createElement(m,l(l({ref:t},c),{},{components:n})):a.a.createElement(m,l({ref:t},c))}</span>));</span>function <span class="fstat-no" title="function not covered" >m(</span>e,t){var n=<span class="cstat-no" title="statement not covered" >arguments,</span>i=<span class="cstat-no" title="statement not covered" >t&&t.mdxType;<span class="cstat-no" title="statement not covered" ></span>if("string"==typeof e||i){var r=<span class="cstat-no" title="statement not covered" >n.length,</span>o=<span class="cstat-no" title="statement not covered" >new Array(r);<span class="cstat-no" title="statement not covered" ></span>o[0]=d;v</span>ar l=<span class="cstat-no" title="statement not covered" >{};<span class="cstat-no" title="statement not covered" ></span>for(var s in t)<span class="cstat-no" title="statement not covered" >hasOwnProperty.call(t,s)&&(l[s]=t[s]);<span class="cstat-no" title="statement not covered" >l</span></span>.originalType=e,l.mdxType="string"==typeof e?e:i,o[1]=l;<span class="cstat-no" title="statement not covered" >f</span>or(var c=<span class="cstat-no" title="statement not covered" >2;</span>c<r;c++)<span class="cstat-no" title="statement not covered" >o[c]=n[c];<span class="cstat-no" title="statement not covered" >r</span></span>eturn a.a.createElement.apply(null,o)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn a.a.createElement.apply(null,n)}<span class="cstat-no" title="statement not covered" ></span>d.displayName="MDXCreateElement"}</span>}]);</span></pre></td></tr>
|
|
50
|
-
</table></pre>
|
|
51
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
52
|
-
</div><!-- /wrapper -->
|
|
53
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
54
|
-
Code coverage
|
|
55
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Sun Aug 30 2020 20:39:29 GMT+0200 (GMT+02:00)
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<script src="../../../../prettify.js"></script>
|
|
59
|
-
<script>
|
|
60
|
-
window.onload = function () {
|
|
61
|
-
if (typeof prettyPrint === 'function') {
|
|
62
|
-
prettyPrint();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
</script>
|
|
66
|
-
<script src="../../../../sorter.js"></script>
|
|
67
|
-
<script src="../../../../block-navigation.js"></script>
|
|
68
|
-
</body>
|
|
69
|
-
</html>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Code coverage report for keuss/docusaurus/.docusaurus/keuss-gh-pages/5f7c35e9.2fa77599.js</title>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<link rel="stylesheet" href="../../../../prettify.css" />
|
|
7
|
-
<link rel="stylesheet" href="../../../../base.css" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<style type='text/css'>
|
|
10
|
-
.coverage-summary .sorter {
|
|
11
|
-
background-image: url(../../../../sort-arrow-sprite.png);
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<div class='wrapper'>
|
|
17
|
-
<div class='pad1'>
|
|
18
|
-
<h1>
|
|
19
|
-
<a href="../../../../index.html">All files</a> / <a href="index.html">keuss/docusaurus/.docusaurus/keuss-gh-pages</a> 5f7c35e9.2fa77599.js
|
|
20
|
-
</h1>
|
|
21
|
-
<div class='clearfix'>
|
|
22
|
-
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">0% </span>
|
|
24
|
-
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>0/88</span>
|
|
26
|
-
</div>
|
|
27
|
-
<div class='fl pad1y space-right2'>
|
|
28
|
-
<span class="strong">0% </span>
|
|
29
|
-
<span class="quiet">Branches</span>
|
|
30
|
-
<span class='fraction'>0/45</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Functions</span>
|
|
35
|
-
<span class='fraction'>0/22</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">0% </span>
|
|
39
|
-
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>0/1</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<p class="quiet">
|
|
44
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
<div class='status-line low'></div>
|
|
48
|
-
<pre><table class="coverage">
|
|
49
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{68:<span class="fstat-no" title="function not covered" >fu</span>nction(e,n,t){"use strict";<span class="cstat-no" title="statement not covered" >t.r(n),t.d(n,"frontMatter",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return o}</span>)),t.d(n,"metadata",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return l}</span>)),t.d(n,"rightToc",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return s}</span>)),t.d(n,"default",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return c}</span>));v</span>ar r=<span class="cstat-no" title="statement not covered" >t(2),</span>a=<span class="cstat-no" title="statement not covered" >t(6),</span>i=(<span class="cstat-no" title="statement not covered" >t(0),t(91))</span>,o=<span class="cstat-no" title="statement not covered" >{id:"no-signaller",title:"Using no signaller",sidebar_label:"Using no signaller"},</span>l=<span class="cstat-no" title="statement not covered" >{unversionedId:"usage/no-signaller",id:"usage/no-signaller",isDocsHomePage:!1,title:"Using no signaller",description:"Even when using signallers, pop operations on queue never block or wait forever; waiting pop operations are anyway terminated after 15000 millisecs",source:"@site/docs/usage/no-signaller.md",permalink:"/keuss/docs/usage/no-signaller",editUrl:"https://github.com/pepmartinez/keuss/edit/master/website/docs/usage/no-signaller.md",sidebar_label:"Using no signaller",sidebar:"someSidebar",previous:{title:"Shutdown",permalink:"/keuss/docs/usage/shutdown"},next:{title:"Redis Connections",permalink:"/keuss/docs/usage/redis-conns"}},</span>s=<span class="cstat-no" title="statement not covered" >[],</span>p=<span class="cstat-no" title="statement not covered" >{rightToc:s};</span>function <span class="fstat-no" title="function not covered" >c(</span>e){var n=<span class="cstat-no" title="statement not covered" >e.components,</span>t=<span class="cstat-no" title="statement not covered" >Object(a.a)(e,["components"]);<span class="cstat-no" title="statement not covered" ></span>return Object(i.b)("wrapper",Object(r.a)({},p,t,{components:n,mdxType:"MDXLayout"}),Object(i.b)("p",null,"Even when using signallers, ",Object(i.b)("inlineCode",{parentName:"p"},"pop")," operations on queue never block or wait forever; waiting ",Object(i.b)("inlineCode",{parentName:"p"},"pop")," operations are anyway terminated after 15000 millisecs\nor whatever specified in the ",Object(i.b)("inlineCode",{parentName:"p"},"pollInterval")," parameter) and silently re-initiated. That is, a ",Object(i.b)("inlineCode",{parentName:"p"},"pop()")," on an empty queue will appear blocked forever to\nthe caller, but behind the scenes it'll work pretty much as if it were doing a poll every 15 secs"),Object(i.b)("p",null,"If a signaller is used (or if a signaller other than ",Object(i.b)("inlineCode",{parentName:"p"},"local")," is used, if ",Object(i.b)("inlineCode",{parentName:"p"},"push()")," and ",Object(i.b)("inlineCode",{parentName:"p"},"pop()")," happen on different machines) the ",Object(i.b)("inlineCode",{parentName:"p"},"pop()")," will be awaken almost\nimmediately after the ",Object(i.b)("inlineCode",{parentName:"p"},"push()"),"; if no signaller is used (or ",Object(i.b)("inlineCode",{parentName:"p"},"local"),"is used, but the action happens in separated machines) ",Object(i.b)("inlineCode",{parentName:"p"},"pop()")," will behave exactly as if\nit were doing a poll() internally;"),Object(i.b)("p",null,"Another way to put it is, ",Object(i.b)("inlineCode",{parentName:"p"},"pop()")," operations would have a maximum latency of ",Object(i.b)("inlineCode",{parentName:"p"},"pollInterval")," millisecs, but also provides a safe backup in the event of\nsignalling loss."))}<span class="cstat-no" title="statement not covered" ></span>c.isMDXComponent=!0}</span>,91:<span class="fstat-no" title="function not covered" >fu</span>nction(e,n,t){"use strict";<span class="cstat-no" title="statement not covered" >t.d(n,"a",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return u}</span>)),t.d(n,"b",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return m}</span>));v</span>ar r=<span class="cstat-no" title="statement not covered" >t(0),</span>a=<span class="cstat-no" title="statement not covered" >t.n(r);</span>function <span class="fstat-no" title="function not covered" >i(</span>e,n,t){<span class="cstat-no" title="statement not covered" >return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}</span>function <span class="fstat-no" title="function not covered" >o(</span>e,n){var t=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var r=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>n&&(r=r.filter((<span class="fstat-no" title="function not covered" >fu</span>nction(n){<span class="cstat-no" title="statement not covered" >return Object.getOwnPropertyDescriptor(e,n).enumerable}</span>))),t.push.apply(t,r)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn t}</span>function <span class="fstat-no" title="function not covered" >l(</span>e){<span class="cstat-no" title="statement not covered" >for(var n=<span class="cstat-no" title="statement not covered" >1;</span>n<arguments.length;n++){var t=<span class="cstat-no" title="statement not covered" >null!=arguments[n]?arguments[n]:{};<span class="cstat-no" title="statement not covered" ></span>n%2?o(Object(t),!0).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(n){<span class="cstat-no" title="statement not covered" >i(e,n,t[n])}</span>)):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(n){<span class="cstat-no" title="statement not covered" >Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}</span>))}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn e}</span>function <span class="fstat-no" title="function not covered" >s(</span>e,n){<span class="cstat-no" title="statement not covered" >if(null==e)<span class="cstat-no" title="statement not covered" >return{};v</span></span>ar t,r,a=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e,n){<span class="cstat-no" title="statement not covered" >if(null==e)<span class="cstat-no" title="statement not covered" >return{};v</span></span>ar t,r,a=<span class="cstat-no" title="statement not covered" >{},</span>i=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>for(r=0;r<i.length;r++)<span class="cstat-no" title="statement not covered" >t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);<span class="cstat-no" title="statement not covered" >r</span></span>eturn a}</span>(e,n);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var i=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>for(r=0;r<i.length;r++)<span class="cstat-no" title="statement not covered" >t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}<span class="cstat-no" title="statement not covered" ></span></span>r</span>eturn a}</span>var p=<span class="cstat-no" title="statement not covered" >a.a.createContext({}),</span>c=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e){var n=<span class="cstat-no" title="statement not covered" >a.a.useContext(p),</span>t=<span class="cstat-no" title="statement not covered" >n;<span class="cstat-no" title="statement not covered" ></span>return e&&(t="function"==typeof e?e(n):l(l({},n),e)),t}</span>,</span>u=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e){var n=<span class="cstat-no" title="statement not covered" >c(e.components);<span class="cstat-no" title="statement not covered" ></span>return a.a.createElement(p.Provider,{value:n},e.children)}</span>,</span>b=<span class="cstat-no" title="statement not covered" >{inlineCode:"code",wrapper:<span class="fstat-no" title="function not covered" >fu</span>nction(e){var n=<span class="cstat-no" title="statement not covered" >e.children;<span class="cstat-no" title="statement not covered" ></span>return a.a.createElement(a.a.Fragment,{},n)}</span>},</span>d=<span class="cstat-no" title="statement not covered" >a.a.forwardRef((<span class="fstat-no" title="function not covered" >fu</span>nction(e,n){var t=<span class="cstat-no" title="statement not covered" >e.components,</span>r=<span class="cstat-no" title="statement not covered" >e.mdxType,</span>i=<span class="cstat-no" title="statement not covered" >e.originalType,</span>o=<span class="cstat-no" title="statement not covered" >e.parentName,</span>p=<span class="cstat-no" title="statement not covered" >s(e,["components","mdxType","originalType","parentName"]),</span>u=<span class="cstat-no" title="statement not covered" >c(t),</span>d=<span class="cstat-no" title="statement not covered" >r,</span>m=<span class="cstat-no" title="statement not covered" >u["".concat(o,".").concat(d)]||u[d]||b[d]||i;<span class="cstat-no" title="statement not covered" ></span>return t?a.a.createElement(m,l(l({ref:n},p),{},{components:t})):a.a.createElement(m,l({ref:n},p))}</span>));</span>function <span class="fstat-no" title="function not covered" >m(</span>e,n){var t=<span class="cstat-no" title="statement not covered" >arguments,</span>r=<span class="cstat-no" title="statement not covered" >n&&n.mdxType;<span class="cstat-no" title="statement not covered" ></span>if("string"==typeof e||r){var i=<span class="cstat-no" title="statement not covered" >t.length,</span>o=<span class="cstat-no" title="statement not covered" >new Array(i);<span class="cstat-no" title="statement not covered" ></span>o[0]=d;v</span>ar l=<span class="cstat-no" title="statement not covered" >{};<span class="cstat-no" title="statement not covered" ></span>for(var s in n)<span class="cstat-no" title="statement not covered" >hasOwnProperty.call(n,s)&&(l[s]=n[s]);<span class="cstat-no" title="statement not covered" >l</span></span>.originalType=e,l.mdxType="string"==typeof e?e:r,o[1]=l;<span class="cstat-no" title="statement not covered" >f</span>or(var p=<span class="cstat-no" title="statement not covered" >2;</span>p<i;p++)<span class="cstat-no" title="statement not covered" >o[p]=t[p];<span class="cstat-no" title="statement not covered" >r</span></span>eturn a.a.createElement.apply(null,o)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn a.a.createElement.apply(null,t)}<span class="cstat-no" title="statement not covered" ></span>d.displayName="MDXCreateElement"}</span>}]);</span></pre></td></tr>
|
|
50
|
-
</table></pre>
|
|
51
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
52
|
-
</div><!-- /wrapper -->
|
|
53
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
54
|
-
Code coverage
|
|
55
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Sun Aug 30 2020 20:39:29 GMT+0200 (GMT+02:00)
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<script src="../../../../prettify.js"></script>
|
|
59
|
-
<script>
|
|
60
|
-
window.onload = function () {
|
|
61
|
-
if (typeof prettyPrint === 'function') {
|
|
62
|
-
prettyPrint();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
</script>
|
|
66
|
-
<script src="../../../../sorter.js"></script>
|
|
67
|
-
<script src="../../../../block-navigation.js"></script>
|
|
68
|
-
</body>
|
|
69
|
-
</html>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Code coverage report for keuss/docusaurus/.docusaurus/keuss-gh-pages/6299bd84.ec197a3e.js</title>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<link rel="stylesheet" href="../../../../prettify.css" />
|
|
7
|
-
<link rel="stylesheet" href="../../../../base.css" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<style type='text/css'>
|
|
10
|
-
.coverage-summary .sorter {
|
|
11
|
-
background-image: url(../../../../sort-arrow-sprite.png);
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<div class='wrapper'>
|
|
17
|
-
<div class='pad1'>
|
|
18
|
-
<h1>
|
|
19
|
-
<a href="../../../../index.html">All files</a> / <a href="index.html">keuss/docusaurus/.docusaurus/keuss-gh-pages</a> 6299bd84.ec197a3e.js
|
|
20
|
-
</h1>
|
|
21
|
-
<div class='clearfix'>
|
|
22
|
-
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">0% </span>
|
|
24
|
-
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>0/2</span>
|
|
26
|
-
</div>
|
|
27
|
-
<div class='fl pad1y space-right2'>
|
|
28
|
-
<span class="strong">0% </span>
|
|
29
|
-
<span class="quiet">Branches</span>
|
|
30
|
-
<span class='fraction'>0/2</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Functions</span>
|
|
35
|
-
<span class='fraction'>0/1</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">0% </span>
|
|
39
|
-
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>0/1</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<p class="quiet">
|
|
44
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
<div class='status-line low'></div>
|
|
48
|
-
<pre><table class="coverage">
|
|
49
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{69:<span class="fstat-no" title="function not covered" >fu</span>nction(e){<span class="cstat-no" title="statement not covered" >e.exports=JSON.parse('{"docsSidebars":{"someSidebar":[{"collapsed":true,"type":"category","label":"Intro","items":[{"type":"link","label":"About","href":"/keuss/docs/"},{"type":"link","label":"Quickstart","href":"/keuss/docs/quickstart"},{"type":"link","label":"Concepts","href":"/keuss/docs/concepts"}]},{"collapsed":true,"type":"category","label":"Usage","items":[{"type":"link","label":"Bucket-based backends","href":"/keuss/docs/usage/buckets"},{"type":"link","label":"Shutdown","href":"/keuss/docs/usage/shutdown"},{"type":"link","label":"Using no signaller","href":"/keuss/docs/usage/no-signaller"},{"type":"link","label":"Redis Connections","href":"/keuss/docs/usage/redis-conns"},{"type":"link","label":"Pipelines","href":"/keuss/docs/usage/pipelines"}]},{"collapsed":true,"type":"category","label":"API","items":[{"type":"link","label":"Factory","href":"/keuss/docs/api/factory"},{"type":"link","label":"Signaller","href":"/keuss/docs/api/signal"},{"type":"link","label":"Stats","href":"/keuss/docs/api/stats"},{"type":"link","label":"Queue","href":"/keuss/docs/api/queue"}]},{"collapsed":true,"type":"category","label":"Examples","items":[{"type":"link","label":"Examples","href":"/keuss/docs/examples"}]},{"collapsed":true,"type":"category","label":"Changelog","items":[{"type":"link","label":"Changelog","href":"/keuss/docs/changelog"}]}]},"permalinkToSidebar":{"/keuss/docs/":"someSidebar","/keuss/docs/api/factory":"someSidebar","/keuss/docs/api/queue":"someSidebar","/keuss/docs/api/signal":"someSidebar","/keuss/docs/api/stats":"someSidebar","/keuss/docs/changelog":"someSidebar","/keuss/docs/concepts":"someSidebar","/keuss/docs/examples":"someSidebar","/keuss/docs/quickstart":"someSidebar","/keuss/docs/usage/buckets":"someSidebar","/keuss/docs/usage/no-signaller":"someSidebar","/keuss/docs/usage/pipelines":"someSidebar","/keuss/docs/usage/redis-conns":"someSidebar","/keuss/docs/usage/shutdown":"someSidebar"},"version":null}')}</span>}]);</span></pre></td></tr>
|
|
50
|
-
</table></pre>
|
|
51
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
52
|
-
</div><!-- /wrapper -->
|
|
53
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
54
|
-
Code coverage
|
|
55
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Sun Aug 30 2020 20:39:29 GMT+0200 (GMT+02:00)
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<script src="../../../../prettify.js"></script>
|
|
59
|
-
<script>
|
|
60
|
-
window.onload = function () {
|
|
61
|
-
if (typeof prettyPrint === 'function') {
|
|
62
|
-
prettyPrint();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
</script>
|
|
66
|
-
<script src="../../../../sorter.js"></script>
|
|
67
|
-
<script src="../../../../block-navigation.js"></script>
|
|
68
|
-
</body>
|
|
69
|
-
</html>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Code coverage report for keuss/docusaurus/.docusaurus/keuss-gh-pages/6875c492.cdf3e939.js</title>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<link rel="stylesheet" href="../../../../prettify.css" />
|
|
7
|
-
<link rel="stylesheet" href="../../../../base.css" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<style type='text/css'>
|
|
10
|
-
.coverage-summary .sorter {
|
|
11
|
-
background-image: url(../../../../sort-arrow-sprite.png);
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<div class='wrapper'>
|
|
17
|
-
<div class='pad1'>
|
|
18
|
-
<h1>
|
|
19
|
-
<a href="../../../../index.html">All files</a> / <a href="index.html">keuss/docusaurus/.docusaurus/keuss-gh-pages</a> 6875c492.cdf3e939.js
|
|
20
|
-
</h1>
|
|
21
|
-
<div class='clearfix'>
|
|
22
|
-
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">0% </span>
|
|
24
|
-
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>0/51</span>
|
|
26
|
-
</div>
|
|
27
|
-
<div class='fl pad1y space-right2'>
|
|
28
|
-
<span class="strong">0% </span>
|
|
29
|
-
<span class="quiet">Branches</span>
|
|
30
|
-
<span class='fraction'>0/40</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Functions</span>
|
|
35
|
-
<span class='fraction'>0/7</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">0% </span>
|
|
39
|
-
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>0/1</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<p class="quiet">
|
|
44
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
<div class='status-line low'></div>
|
|
48
|
-
<pre><table class="coverage">
|
|
49
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{70:<span class="fstat-no" title="function not covered" >fu</span>nction(e,a,t){"use strict";<span class="cstat-no" title="statement not covered" >t.r(a);v</span>ar r=<span class="cstat-no" title="statement not covered" >t(0),</span>n=<span class="cstat-no" title="statement not covered" >t.n(r),</span>l=<span class="cstat-no" title="statement not covered" >t(96),</span>m=<span class="cstat-no" title="statement not covered" >t(98),</span>c=<span class="cstat-no" title="statement not covered" >t(93);<span class="cstat-no" title="statement not covered" ></span>a.default=<span class="fstat-no" title="function not covered" >fu</span>nction(e){var a=<span class="cstat-no" title="statement not covered" >e.metadata,</span>t=<span class="cstat-no" title="statement not covered" >e.items,</span>r=<span class="cstat-no" title="statement not covered" >a.allTagsPath,</span>o=<span class="cstat-no" title="statement not covered" >a.name,</span>s=<span class="cstat-no" title="statement not covered" >a.count;<span class="cstat-no" title="statement not covered" ></span>return n.a.createElement(l.a,{title:'Posts tagged "'+o+'"',description:'Blog | Tagged "'+o+'"'},n.a.createElement("div",{className:"container margin-vert--lg"},n.a.createElement("div",{className:"row"},n.a.createElement("main",{className:"col col--8 col--offset-2"},n.a.createElement("h1",null,s," ",<span class="fstat-no" title="function not covered" >fu</span>nction(e,a){<span class="cstat-no" title="statement not covered" >return e>1?a+"s":a}</span>(s,"post"),' tagged with "',o,'"'),n.a.createElement(c.a,{href:r},"View All Tags"),n.a.createElement("div",{className:"margin-vert--xl"},t.map((<span class="fstat-no" title="function not covered" >fu</span>nction(e){var a=<span class="cstat-no" title="statement not covered" >e.content;<span class="cstat-no" title="statement not covered" ></span>return n.a.createElement(m.a,{key:a.metadata.permalink,frontMatter:a.frontMatter,metadata:a.metadata,truncated:!0},n.a.createElement(a,null))}</span>)))))))}</span>}</span>,98:<span class="fstat-no" title="function not covered" >fu</span>nction(e,a,t){"use strict";var r=<span class="cstat-no" title="statement not covered" >t(0),</span>n=<span class="cstat-no" title="statement not covered" >t.n(r),</span>l=<span class="cstat-no" title="statement not covered" >t(94),</span>m=<span class="cstat-no" title="statement not covered" >t(91),</span>c=<span class="cstat-no" title="statement not covered" >t(97),</span>o=<span class="cstat-no" title="statement not covered" >t(93),</span>s=<span class="cstat-no" title="statement not covered" >t(101),</span>i=<span class="cstat-no" title="statement not covered" >t(95),</span>g=<span class="cstat-no" title="statement not covered" >t(47),</span>u=<span class="cstat-no" title="statement not covered" >t.n(g),</span>E=<span class="cstat-no" title="statement not covered" >["January","February","March","April","May","June","July","August","September","October","November","December"];<span class="cstat-no" title="statement not covered" ></span>a.a=<span class="fstat-no" title="function not covered" >fu</span>nction(e){var a,t,r,g,d,h=<span class="cstat-no" title="statement not covered" >e.children,</span>v=<span class="cstat-no" title="statement not covered" >e.frontMatter,</span>p=<span class="cstat-no" title="statement not covered" >e.metadata,</span>b=<span class="cstat-no" title="statement not covered" >e.truncated,</span>f=<span class="cstat-no" title="statement not covered" >e.isBlogPostPage,</span>N=<span class="cstat-no" title="statement not covered" >void 0!==f&&f,</span>_=<span class="cstat-no" title="statement not covered" >p.date,</span>w=<span class="cstat-no" title="statement not covered" >p.permalink,</span>k=<span class="cstat-no" title="statement not covered" >p.tags,</span>y=<span class="cstat-no" title="statement not covered" >p.readingTime,</span>T=<span class="cstat-no" title="statement not covered" >v.author,</span>M=<span class="cstat-no" title="statement not covered" >v.title,</span>P=<span class="cstat-no" title="statement not covered" >v.image,</span>J=<span class="cstat-no" title="statement not covered" >v.keywords,</span>F=<span class="cstat-no" title="statement not covered" >v.author_url||v.authorURL,</span>I=<span class="cstat-no" title="statement not covered" >v.author_title||v.authorTitle,</span>R=<span class="cstat-no" title="statement not covered" >v.author_image_url||v.authorImageURL,</span>j=<span class="cstat-no" title="statement not covered" >Object(i.a)(P,{absolute:!0});<span class="cstat-no" title="statement not covered" ></span>return n.a.createElement(n.a.Fragment,null,n.a.createElement(c.a,null,J&&J.length&&n.a.createElement("meta",{name:"keywords",content:J.join(",")}),P&&n.a.createElement("meta",{property:"og:image",content:j}),P&&n.a.createElement("meta",{property:"twitter:image",content:j}),P&&n.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+M})),n.a.createElement("article",{className:N?void 0:"margin-bottom--xl"},(a=N?"h1":"h2",t=_.substring(0,10).split("-"),r=t[0],g=E[parseInt(t[1],10)-1],d=parseInt(t[2],10),n.a.createElement("header",null,n.a.createElement(a,{className:Object(l.a)("margin-bottom--sm",u.a.blogPostTitle)},N?M:n.a.createElement(o.a,{to:w},M)),n.a.createElement("div",{className:"margin-vert--md"},n.a.createElement("time",{dateTime:_,className:u.a.blogPostDate},g," ",d,", ",r," ",y&&n.a.createElement(n.a.Fragment,null," \xb7 ",Math.ceil(y)," min read"))),n.a.createElement("div",{className:"avatar margin-vert--md"},R&&n.a.createElement("a",{className:"avatar__photo-link avatar__photo",href:F,target:"_blank",rel:"noreferrer noopener"},n.a.createElement("img",{src:R,alt:T})),n.a.createElement("div",{className:"avatar__intro"},T&&n.a.createElement(n.a.Fragment,null,n.a.createElement("h4",{className:"avatar__name"},n.a.createElement("a",{href:F,target:"_blank",rel:"noreferrer noopener"},T)),n.a.createElement("small",{className:"avatar__subtitle"},I)))))),n.a.createElement("section",{className:"markdown"},n.a.createElement(m.a,{components:s.a},h)),(k.length>0||b)&&n.a.createElement("footer",{className:"row margin-vert--lg"},k.length>0&&n.a.createElement("div",{className:"col"},n.a.createElement("strong",null,"Tags:"),k.map((<span class="fstat-no" title="function not covered" >fu</span>nction(e){var a=<span class="cstat-no" title="statement not covered" >e.label,</span>t=<span class="cstat-no" title="statement not covered" >e.permalink;<span class="cstat-no" title="statement not covered" ></span>return n.a.createElement(o.a,{key:t,className:"margin-horiz--sm",to:t},a)}</span>))),b&&n.a.createElement("div",{className:"col text--right"},n.a.createElement(o.a,{to:p.permalink,"aria-label":"Read more about "+M},n.a.createElement("strong",null,"Read More"))))))}</span>}</span>}]);</span></pre></td></tr>
|
|
50
|
-
</table></pre>
|
|
51
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
52
|
-
</div><!-- /wrapper -->
|
|
53
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
54
|
-
Code coverage
|
|
55
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Sun Aug 30 2020 20:39:29 GMT+0200 (GMT+02:00)
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<script src="../../../../prettify.js"></script>
|
|
59
|
-
<script>
|
|
60
|
-
window.onload = function () {
|
|
61
|
-
if (typeof prettyPrint === 'function') {
|
|
62
|
-
prettyPrint();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
</script>
|
|
66
|
-
<script src="../../../../sorter.js"></script>
|
|
67
|
-
<script src="../../../../block-navigation.js"></script>
|
|
68
|
-
</body>
|
|
69
|
-
</html>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Code coverage report for keuss/docusaurus/.docusaurus/keuss-gh-pages/6beec1d2.6873e708.js</title>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<link rel="stylesheet" href="../../../../prettify.css" />
|
|
7
|
-
<link rel="stylesheet" href="../../../../base.css" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<style type='text/css'>
|
|
10
|
-
.coverage-summary .sorter {
|
|
11
|
-
background-image: url(../../../../sort-arrow-sprite.png);
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<div class='wrapper'>
|
|
17
|
-
<div class='pad1'>
|
|
18
|
-
<h1>
|
|
19
|
-
<a href="../../../../index.html">All files</a> / <a href="index.html">keuss/docusaurus/.docusaurus/keuss-gh-pages</a> 6beec1d2.6873e708.js
|
|
20
|
-
</h1>
|
|
21
|
-
<div class='clearfix'>
|
|
22
|
-
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">0% </span>
|
|
24
|
-
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>0/88</span>
|
|
26
|
-
</div>
|
|
27
|
-
<div class='fl pad1y space-right2'>
|
|
28
|
-
<span class="strong">0% </span>
|
|
29
|
-
<span class="quiet">Branches</span>
|
|
30
|
-
<span class='fraction'>0/45</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Functions</span>
|
|
35
|
-
<span class='fraction'>0/22</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">0% </span>
|
|
39
|
-
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>0/1</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<p class="quiet">
|
|
44
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
<div class='status-line low'></div>
|
|
48
|
-
<pre><table class="coverage">
|
|
49
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{71:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,n){"use strict";<span class="cstat-no" title="statement not covered" >n.r(t),n.d(t,"frontMatter",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return i}</span>)),n.d(t,"metadata",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return s}</span>)),n.d(t,"rightToc",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return l}</span>)),n.d(t,"default",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return b}</span>));v</span>ar a=<span class="cstat-no" title="statement not covered" >n(2),</span>o=<span class="cstat-no" title="statement not covered" >n(6),</span>r=(<span class="cstat-no" title="statement not covered" >n(0),n(91))</span>,i=<span class="cstat-no" title="statement not covered" >{id:"buckets",title:"Bucket-based backends",sidebar_label:"Bucket-based backends"},</span>s=<span class="cstat-no" title="statement not covered" >{unversionedId:"usage/buckets",id:"usage/buckets",isDocsHomePage:!1,title:"Bucket-based backends",description:"Up to version 1.4.X all backends worked in the same way, one element at a time: pushing and popping elements fired one or more operations per element on the underlying storage. This means the bottleneck would end up being the storage's I/O; redis and mongo both allow quite high I/O rates, enough to work at thousands of operations per second. Still, the limit was there.",source:"@site/docs/usage/buckets.md",permalink:"/keuss/docs/usage/buckets",editUrl:"https://github.com/pepmartinez/keuss/edit/master/website/docs/usage/buckets.md",sidebar_label:"Bucket-based backends",sidebar:"someSidebar",previous:{title:"Concepts",permalink:"/keuss/docs/concepts"},next:{title:"Shutdown",permalink:"/keuss/docs/usage/shutdown"}},</span>l=<span class="cstat-no" title="statement not covered" >[{value:"bucket-mongo-safe",id:"bucket-mongo-safe",children:[]},{value:"bucket-mongo",id:"bucket-mongo",children:[]}],</span>c=<span class="cstat-no" title="statement not covered" >{rightToc:l};</span>function <span class="fstat-no" title="function not covered" >b(</span>e){var t=<span class="cstat-no" title="statement not covered" >e.components,</span>n=<span class="cstat-no" title="statement not covered" >Object(o.a)(e,["components"]);<span class="cstat-no" title="statement not covered" ></span>return Object(r.b)("wrapper",Object(a.a)({},c,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("p",null,"Up to version 1.4.X all backends worked in the same way, one element at a time: pushing and popping elements fired one or more operations per element on the underlying storage. This means the bottleneck would end up being the storage's I/O; redis and mongo both allow quite high I/O rates, enough to work at thousands of operations per second. Still, the limit was there."),Object(r.b)("p",null,"Starting with v1.5.2 keuss includes 2 backends that do not share this limitation: they work by packing many elements inside a single 'storage unit'. Sure enough, this adds some complexity and extra risks, but the throughput improvement is staggering: on mongodb it goes from 3-4 Ktps to 35-40Ktps, and the bottleneck shifted from mongod to the client's cpu, busy serializing and deserializing payloads."),Object(r.b)("p",null,"Two bucked-based backends were added, both based on mongodb: ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"#bucket-mongo"}),"bucket-mongo")," and ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"#bucket-mongo-safe"}),"bucket-mongo-safe"),". Both are usable, but there is little gain on using fhe first over the second: ",Object(r.b)("inlineCode",{parentName:"p"},"bucket-mongo")," was used as a prototyping area, and although perfectly usable, it turned out ",Object(r.b)("inlineCode",{parentName:"p"},"bucket-mongo-safe")," is better in almost every aspect: it provides better guarantees and more features, at about the same performance."),Object(r.b)("h3",{id:"bucket-mongo-safe"},"bucket-mongo-safe"),Object(r.b)("p",null,"In addition to the general options, the factory accepts the following extra options:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"bucket_max_size"),": maximum number of elements in a bucket, defaults to 1024"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"bucket_max_wait"),": milliseconds to wait before flushing a push bucket: pushes are buffered in a push bucket, which are flushed when they're full (reach ",Object(r.b)("inlineCode",{parentName:"li"},"bucket_max_size")," elements). If this amount of millisecs go by and the push bucket is not yet full, it is flushed as is. Defaults to 500."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"reserve_delay"),": number of seconds a bucket keeps its 'reserved' status when read from mongodb. Defaults to 30."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"state_flush_period"),": changes in state on each active/read bucket are flushed to mongodb every those milliseconds. Defaults to 500."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"reject_delta_base"),", ",Object(r.b)("inlineCode",{parentName:"li"},"reject_delta_factor"),": if no call to ",Object(r.b)("inlineCode",{parentName:"li"},"ko")," provide a ",Object(r.b)("inlineCode",{parentName:"li"},"next_t"),", the backend will set one using a simple grade-1 polynom, in the form of ",Object(r.b)("inlineCode",{parentName:"li"},"reject_delta_factor * tries + reject_delta_base"),", in millisecs. They default to ",Object(r.b)("inlineCode",{parentName:"li"},"10000")," and ",Object(r.b)("inlineCode",{parentName:"li"},"((reserve_delay * 1000) || 30000)")," respectively"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"reject_timeout_grace"),": number of seconds to wait since a bucket is reserved/read until it is considered timed out; after this, what is left of the bucket is rejected/retried. Defaults to (",Object(r.b)("inlineCode",{parentName:"li"},"reserve_delay")," * ",Object(r.b)("inlineCode",{parentName:"li"},"0.8"),")"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"state_flush_period"),": flush intermediate state changes in each active read bucked every this amount of millisecs")),Object(r.b)("p",null,"Bucket-mongo-safe works by packing many payloads in a single mongodb object:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"At ",Object(r.b)("inlineCode",{parentName:"li"},"push()")," time, objects are buffered in memory and pushed (inserted) only when bucket_max_size has been reached or when a bucket has been getting filled for longer than bucket_max_wait millisecs."),Object(r.b)("li",{parentName:"ul"},"At ",Object(r.b)("inlineCode",{parentName:"li"},"pop/reserve")," time full objects are read into mem, and then individual payloads returned from there. Both commits and pops are just marked in memory and then flushed every state_flush_period millisecs, or when the bucked is exhausted."),Object(r.b)("li",{parentName:"ul"},"Buckets remain unmodified since they are created in terms of the payloads they contain: a ",Object(r.b)("inlineCode",{parentName:"li"},"pop()")," or ",Object(r.b)("inlineCode",{parentName:"li"},"ko/ok")," would only mark payloads inside buckets as read/not-anymore-available, but buckets are never splitted nor merged.")),Object(r.b)("p",null,"Thus, it is important to call ",Object(r.b)("inlineCode",{parentName:"p"},"drain()")," on queues of this backend: this call ensures all pending write buckets are interted in mongodb, and also ensures all in-memory buckets left are completely read (served through pop/reserve)."),Object(r.b)("p",null,"Also, there is little difference in performance and I/O between ",Object(r.b)("inlineCode",{parentName:"p"},"pop")," and ",Object(r.b)("inlineCode",{parentName:"p"},"reserve/commit"),"; performance is no longer a reason to prefer one over the other."),Object(r.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(r.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(r.b)("h5",{parentName:"div"},Object(r.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(r.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(r.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"note")),Object(r.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(r.b)("p",{parentName:"div"},"Scheduling on ",Object(r.b)("inlineCode",{parentName:"p"},"bucket-mongo-safe")," is perfectly possible, but with a twist: the effective ",Object(r.b)("inlineCode",{parentName:"p"},"mature_t")," of a message will be the oldest in the whole bucket it resides in. This applies to both insert and rollback/ko. In practice this is usually not a big deal, since anyway the ",Object(r.b)("inlineCode",{parentName:"p"},"mature_t")," is a 'not before' time, and that's all Keuss (or any other queuing middleware) would guarantee."))),Object(r.b)("h3",{id:"bucket-mongo"},"bucket-mongo"),Object(r.b)("p",null,"This is a simpler version of buckets-on-mongodb, and for all purposes ",Object(r.b)("inlineCode",{parentName:"p"},"bucket-mongo-safe")," should be preferred; it does not provide reserve, nor schedule. It is however a tad faster and lighter on I/O."),Object(r.b)("p",null,"It is provided only for historical and educational purposes."))}<span class="cstat-no" title="statement not covered" ></span>b.isMDXComponent=!0}</span>,91:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,n){"use strict";<span class="cstat-no" title="statement not covered" >n.d(t,"a",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return d}</span>)),n.d(t,"b",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return m}</span>));v</span>ar a=<span class="cstat-no" title="statement not covered" >n(0),</span>o=<span class="cstat-no" title="statement not covered" >n.n(a);</span>function <span class="fstat-no" title="function not covered" >r(</span>e,t,n){<span class="cstat-no" title="statement not covered" >return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}</span>function <span class="fstat-no" title="function not covered" >i(</span>e,t){var n=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var a=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>t&&(a=a.filter((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >return Object.getOwnPropertyDescriptor(e,t).enumerable}</span>))),n.push.apply(n,a)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn n}</span>function <span class="fstat-no" title="function not covered" >s(</span>e){<span class="cstat-no" title="statement not covered" >for(var t=<span class="cstat-no" title="statement not covered" >1;</span>t<arguments.length;t++){var n=<span class="cstat-no" title="statement not covered" >null!=arguments[t]?arguments[t]:{};<span class="cstat-no" title="statement not covered" ></span>t%2?i(Object(n),!0).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >r(e,t,n[t])}</span>)):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}</span>))}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn e}</span>function <span class="fstat-no" title="function not covered" >l(</span>e,t){<span class="cstat-no" title="statement not covered" >if(null==e)<span class="cstat-no" title="statement not covered" >return{};v</span></span>ar n,a,o=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e,t){<span class="cstat-no" title="statement not covered" >if(null==e)<span class="cstat-no" title="statement not covered" >return{};v</span></span>ar n,a,o=<span class="cstat-no" title="statement not covered" >{},</span>r=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>for(a=0;a<r.length;a++)<span class="cstat-no" title="statement not covered" >n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);<span class="cstat-no" title="statement not covered" >r</span></span>eturn o}</span>(e,t);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var r=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>for(a=0;a<r.length;a++)<span class="cstat-no" title="statement not covered" >n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}<span class="cstat-no" title="statement not covered" ></span></span>r</span>eturn o}</span>var c=<span class="cstat-no" title="statement not covered" >o.a.createContext({}),</span>b=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >o.a.useContext(c),</span>n=<span class="cstat-no" title="statement not covered" >t;<span class="cstat-no" title="statement not covered" ></span>return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n}</span>,</span>d=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >b(e.components);<span class="cstat-no" title="statement not covered" ></span>return o.a.createElement(c.Provider,{value:t},e.children)}</span>,</span>u=<span class="cstat-no" title="statement not covered" >{inlineCode:"code",wrapper:<span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >e.children;<span class="cstat-no" title="statement not covered" ></span>return o.a.createElement(o.a.Fragment,{},t)}</span>},</span>p=<span class="cstat-no" title="statement not covered" >o.a.forwardRef((<span class="fstat-no" title="function not covered" >fu</span>nction(e,t){var n=<span class="cstat-no" title="statement not covered" >e.components,</span>a=<span class="cstat-no" title="statement not covered" >e.mdxType,</span>r=<span class="cstat-no" title="statement not covered" >e.originalType,</span>i=<span class="cstat-no" title="statement not covered" >e.parentName,</span>c=<span class="cstat-no" title="statement not covered" >l(e,["components","mdxType","originalType","parentName"]),</span>d=<span class="cstat-no" title="statement not covered" >b(n),</span>p=<span class="cstat-no" title="statement not covered" >a,</span>m=<span class="cstat-no" title="statement not covered" >d["".concat(i,".").concat(p)]||d[p]||u[p]||r;<span class="cstat-no" title="statement not covered" ></span>return n?o.a.createElement(m,s(s({ref:t},c),{},{components:n})):o.a.createElement(m,s({ref:t},c))}</span>));</span>function <span class="fstat-no" title="function not covered" >m(</span>e,t){var n=<span class="cstat-no" title="statement not covered" >arguments,</span>a=<span class="cstat-no" title="statement not covered" >t&&t.mdxType;<span class="cstat-no" title="statement not covered" ></span>if("string"==typeof e||a){var r=<span class="cstat-no" title="statement not covered" >n.length,</span>i=<span class="cstat-no" title="statement not covered" >new Array(r);<span class="cstat-no" title="statement not covered" ></span>i[0]=p;v</span>ar s=<span class="cstat-no" title="statement not covered" >{};<span class="cstat-no" title="statement not covered" ></span>for(var l in t)<span class="cstat-no" title="statement not covered" >hasOwnProperty.call(t,l)&&(s[l]=t[l]);<span class="cstat-no" title="statement not covered" >s</span></span>.originalType=e,s.mdxType="string"==typeof e?e:a,i[1]=s;<span class="cstat-no" title="statement not covered" >f</span>or(var c=<span class="cstat-no" title="statement not covered" >2;</span>c<r;c++)<span class="cstat-no" title="statement not covered" >i[c]=n[c];<span class="cstat-no" title="statement not covered" >r</span></span>eturn o.a.createElement.apply(null,i)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn o.a.createElement.apply(null,n)}<span class="cstat-no" title="statement not covered" ></span>p.displayName="MDXCreateElement"}</span>}]);</span></pre></td></tr>
|
|
50
|
-
</table></pre>
|
|
51
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
52
|
-
</div><!-- /wrapper -->
|
|
53
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
54
|
-
Code coverage
|
|
55
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Sun Aug 30 2020 20:39:29 GMT+0200 (GMT+02:00)
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<script src="../../../../prettify.js"></script>
|
|
59
|
-
<script>
|
|
60
|
-
window.onload = function () {
|
|
61
|
-
if (typeof prettyPrint === 'function') {
|
|
62
|
-
prettyPrint();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
</script>
|
|
66
|
-
<script src="../../../../sorter.js"></script>
|
|
67
|
-
<script src="../../../../block-navigation.js"></script>
|
|
68
|
-
</body>
|
|
69
|
-
</html>
|