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/build/7b786ad4.bbce08e6.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/build</a> 7b786ad4.bbce08e6.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([[18],{72:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,r){"use strict";<span class="cstat-no" title="statement not covered" >r.r(t),r.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>)),r.d(t,"metadata",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return u}</span>)),r.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>)),r.d(t,"default",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return l}</span>));v</span>ar n=<span class="cstat-no" title="statement not covered" >r(2),</span>o=<span class="cstat-no" title="statement not covered" >r(6),</span>a=(<span class="cstat-no" title="statement not covered" >r(0),r(91))</span>,i=<span class="cstat-no" title="statement not covered" >{id:"welcome",title:"New website!",author:"Pep Martinez",author_url:"https://github.com/pepmartinez",tags:["keuss","hello","docusaurus"]},</span>u=<span class="cstat-no" title="statement not covered" >{permalink:"/keuss/blog/welcome",editUrl:"https://github.com/pepmartinez/keuss/edit/master/website/blog/blog/2020-08-04-welcome.md",source:"@site/blog/2020-08-04-welcome.md",description:"We got a brand new site for Keuss, powered by Docusaurus v2. Chances are, if you're reading this, you already found the site...",date:"2020-08-04T00:00:00.000Z",tags:[{label:"keuss",permalink:"/keuss/blog/tags/keuss"},{label:"hello",permalink:"/keuss/blog/tags/hello"},{label:"docusaurus",permalink:"/keuss/blog/tags/docusaurus"}],title:"New website!",readingTime:.33,truncated:!1},</span>s=<span class="cstat-no" title="statement not covered" >[],</span>c=<span class="cstat-no" title="statement not covered" >{rightToc:s};</span>function <span class="fstat-no" title="function not covered" >l(</span>e){var t=<span class="cstat-no" title="statement not covered" >e.components,</span>r=<span class="cstat-no" title="statement not covered" >Object(o.a)(e,["components"]);<span class="cstat-no" title="statement not covered" ></span>return Object(a.b)("wrapper",Object(n.a)({},c,r,{components:t,mdxType:"MDXLayout"}),Object(a.b)("p",null,"We got a brand new site for Keuss, powered by ",Object(a.b)("a",Object(n.a)({parentName:"p"},{href:"https://v2.docusaurus.io"}),"Docusaurus v2"),". Chances are, if you're reading this, you already found the site..."),Object(a.b)("p",null,"Good old README.md, as simple and convenient as it is, was becoming way too big and difficult to navigate. Also, it is not a proper site worth presenting to the world; hence the decision to add a small, simple enough site to Keuss"))}<span class="cstat-no" title="statement not covered" ></span>l.isMDXComponent=!0}</span>,91:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,r){"use strict";<span class="cstat-no" title="statement not covered" >r.d(t,"a",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return p}</span>)),r.d(t,"b",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return f}</span>));v</span>ar n=<span class="cstat-no" title="statement not covered" >r(0),</span>o=<span class="cstat-no" title="statement not covered" >r.n(n);</span>function <span class="fstat-no" title="function not covered" >a(</span>e,t,r){<span class="cstat-no" title="statement not covered" >return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}</span>function <span class="fstat-no" title="function not covered" >i(</span>e,t){var r=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var n=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>t&&(n=n.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>))),r.push.apply(r,n)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn r}</span>function <span class="fstat-no" title="function not covered" >u(</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 r=<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(r),!0).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >a(e,t,r[t])}</span>)):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).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(r,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 r,n,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 r,n,o=<span class="cstat-no" title="statement not covered" >{},</span>a=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>for(n=0;n<a.length;n++)<span class="cstat-no" title="statement not covered" >r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);<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 a=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>for(n=0;n<a.length;n++)<span class="cstat-no" title="statement not covered" >r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}<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>l=<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>r=<span class="cstat-no" title="statement not covered" >t;<span class="cstat-no" title="statement not covered" ></span>return e&&(r="function"==typeof e?e(t):u(u({},t),e)),r}</span>,</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" >l(e.components);<span class="cstat-no" title="statement not covered" ></span>return o.a.createElement(c.Provider,{value:t},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 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>d=<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 r=<span class="cstat-no" title="statement not covered" >e.components,</span>n=<span class="cstat-no" title="statement not covered" >e.mdxType,</span>a=<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" >s(e,["components","mdxType","originalType","parentName"]),</span>p=<span class="cstat-no" title="statement not covered" >l(r),</span>d=<span class="cstat-no" title="statement not covered" >n,</span>f=<span class="cstat-no" title="statement not covered" >p["".concat(i,".").concat(d)]||p[d]||b[d]||a;<span class="cstat-no" title="statement not covered" ></span>return r?o.a.createElement(f,u(u({ref:t},c),{},{components:r})):o.a.createElement(f,u({ref:t},c))}</span>));</span>function <span class="fstat-no" title="function not covered" >f(</span>e,t){var r=<span class="cstat-no" title="statement not covered" >arguments,</span>n=<span class="cstat-no" title="statement not covered" >t&&t.mdxType;<span class="cstat-no" title="statement not covered" ></span>if("string"==typeof e||n){var a=<span class="cstat-no" title="statement not covered" >r.length,</span>i=<span class="cstat-no" title="statement not covered" >new Array(a);<span class="cstat-no" title="statement not covered" ></span>i[0]=d;v</span>ar u=<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)&&(u[s]=t[s]);<span class="cstat-no" title="statement not covered" >u</span></span>.originalType=e,u.mdxType="string"==typeof e?e:n,i[1]=u;<span class="cstat-no" title="statement not covered" >f</span>or(var c=<span class="cstat-no" title="statement not covered" >2;</span>c<a;c++)<span class="cstat-no" title="statement not covered" >i[c]=r[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,r)}<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/build/8070e160.400a4e57.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/build</a> 8070e160.400a4e57.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([[19],{73:<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 c}</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 i}</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 u}</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>s=(<span class="cstat-no" title="statement not covered" >t(0),t(91))</span>,o=<span class="cstat-no" title="statement not covered" >{id:"quickstart",title:"Quickstart",sidebar_label:"Quickstart"},</span>c=<span class="cstat-no" title="statement not covered" >{unversionedId:"quickstart",id:"quickstart",isDocsHomePage:!1,title:"Quickstart",description:"Package Install",source:"@site/docs/quickstart.md",permalink:"/keuss/docs/quickstart",editUrl:"https://github.com/pepmartinez/keuss/edit/master/website/docs/quickstart.md",sidebar_label:"Quickstart",sidebar:"someSidebar",previous:{title:"About",permalink:"/keuss/docs/"},next:{title:"Concepts",permalink:"/keuss/docs/concepts"}},</span>i=<span class="cstat-no" title="statement not covered" >[{value:"Package Install",id:"package-install",children:[]},{value:"Backend interchangeability",id:"backend-interchangeability",children:[]},{value:"Backend interchangeability",id:"backend-interchangeability-1",children:[]},{value:"Full producer and consumer loops",id:"full-producer-and-consumer-loops",children:[]}],</span>l=<span class="cstat-no" title="statement not covered" >{rightToc:i};</span>function <span class="fstat-no" title="function not covered" >u(</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(s.b)("wrapper",Object(r.a)({},l,t,{components:n,mdxType:"MDXLayout"}),Object(s.b)("h2",{id:"package-install"},"Package Install"),Object(s.b)("p",null,Object(s.b)("inlineCode",{parentName:"p"},"keuss")," is installed in the regular way for any npm package:"),Object(s.b)("pre",null,Object(s.b)("code",Object(r.a)({parentName:"pre"},{className:"language-bash"}),"npm install keuss\n")),Object(s.b)("h1",{id:"basic-usage-with-regular-mongodb-backend"},"Basic usage (with regular MongoDB backend)"),Object(s.b)("p",null,"Here's a minimal example of how keuss works. ",Object(s.b)("a",Object(r.a)({parentName:"p"},{href:"https://www.npmjs.com/package/async"}),"async")," is used to implement asynchronous flows in a much readable manner"),Object(s.b)("pre",null,Object(s.b)("code",Object(r.a)({parentName:"pre"},{className:"language-javascript"}),"const async = require ('async');\nconst MQ = require ('keuss/backends/mongo');\n\nMQ ({\n url: 'mongodb://localhost/keuss_test'\n}, (err, factory) => {\n if (err) return console.error(err);\n\n // factory ready, create one queue\n const q = factory.queue ('test_queue', {});\n\n async.series([\n cb => q.push ({elem: 1, headline: 'something something', tags: {a: 1, b: 2}}, cb),\n cb => q.pop ('consumer-1', cb)\n ], (err, res) => {\n if (err) {\n console.error (err);\n }\n else {\n console.log (res[1]);\n // this should print something like:\n // {\n // _id: <some id>,\n // mature: <some date>,\n // payload: { elem: 1, headline: 'something something', tags: { a: 1, b: 2 } },\n // tries: 0\n // }\n }\n\n factory.close ();\n });\n});\n")),Object(s.b)("p",null,"This small test creates a queue named ",Object(s.b)("inlineCode",{parentName:"p"},"test_queue")," backed by mongodb in the mongoDB collection at ",Object(s.b)("inlineCode",{parentName:"p"},"mongodb://localhost/keuss_test"),". Then, a single element is first inserted in the queue, then read from it and printed"),Object(s.b)("h2",{id:"backend-interchangeability"},"Backend interchangeability"),Object(s.b)("p",null,"This example works with any available definition of ",Object(s.b)("inlineCode",{parentName:"p"},"MQ"),"; you just need to specify the chosen backend. For example, to use the ",Object(s.b)("inlineCode",{parentName:"p"},"redis-list")," backend:"),Object(s.b)("pre",null,Object(s.b)("code",Object(r.a)({parentName:"pre"},{className:"language-js"}),"const MQ = require ('keuss/backends/redis-list');\n")),Object(s.b)("h1",{id:"reserve-commit-rollback"},"reserve-commit-rollback"),Object(s.b)("pre",null,Object(s.b)("code",Object(r.a)({parentName:"pre"},{className:"language-javascript"}),"const async = require ('async');\nconst MQ = require ('keuss/backends/mongo');\n\nMQ ({\n url: 'mongodb://localhost/keuss_test'\n}, (err, factory) => {\n if (err) return console.error(err);\n\n // factory ready, create one queue\n const q = factory.queue ('test_queue', {});\n\n async.waterfall ([\n cb => q.push ({elem: 1, headline: 'something something', tags: {a: 1, b: 2}}, cb), // (1)\n (item_id, cb) => q.pop ('consumer-1', {reserve: true}, cb), // (2)\n (item, cb) => {\n console.log ('%s: got %o', new Date().toString (), item); // (3)\n const next_t = new Date().getTime () + 1500;\n q.ko (item, next_t, cb); // (4)\n },\n (ko_res, cb) => q.pop ('consumer-1', {reserve: true}, cb), // (5)\n (item, cb) => {\n console.log ('%s: got %o', new Date().toString (), item); // (6)\n q.ok (item, cb); // (7)\n },\n ], (err, res) => {\n if (err) console.error (err);\n factory.close ();\n });\n});\n")),Object(s.b)("ol",null,Object(s.b)("li",{parentName:"ol"},"An element is inserted."),Object(s.b)("li",{parentName:"ol"},"An element is reserved. It reserves the element previously inserted, and returns it."),Object(s.b)("li",{parentName:"ol"},"This should print the element reserved."),Object(s.b)("li",{parentName:"ol"},"The element reserved is rejected, indicating that it should not be made available until ",Object(s.b)("inlineCode",{parentName:"li"},"now + 1500")," millisecs."),Object(s.b)("li",{parentName:"ol"},"A second attempt at a reserve, this should return an element after 1500 millisecs."),Object(s.b)("li",{parentName:"ol"},"The same element should be printed here, except for the ",Object(s.b)("inlineCode",{parentName:"li"},"tries")," that should be ",Object(s.b)("inlineCode",{parentName:"li"},"1")," instead of ",Object(s.b)("inlineCode",{parentName:"li"},"0"),"."),Object(s.b)("li",{parentName:"ol"},"The element is committed and thus removed from the queue.")),Object(s.b)("h2",{id:"backend-interchangeability-1"},"Backend interchangeability"),Object(s.b)("p",null,"This example works with any definition of ",Object(s.b)("inlineCode",{parentName:"p"},"MQ")," that supports reserve/commit (that is, any except ",Object(s.b)("inlineCode",{parentName:"p"},"redis-list")," and ",Object(s.b)("inlineCode",{parentName:"p"},"bucket-mongo"),"); you just need to specify the chosen backend. For example, to use the ",Object(s.b)("inlineCode",{parentName:"p"},"bucket-mongo-safe")," backend:"),Object(s.b)("pre",null,Object(s.b)("code",Object(r.a)({parentName:"pre"},{className:"language-js"}),"const MQ = require ('keuss/backends/bucket-mongo-safe');\n")),Object(s.b)("h2",{id:"full-producer-and-consumer-loops"},"Full producer and consumer loops"),Object(s.b)("p",null,"This is a more convoluted example: a set of producers inserting messages, and another set of consumers consumig them, all in parallel. The queue stats (elements pushed, elements popped) are shown every second."),Object(s.b)("p",null,"Try and change the uncommented ",Object(s.b)("inlineCode",{parentName:"p"},"const MQ = require('keuss/backends/...');")," to see the performance differences between backends."),Object(s.b)("p",null,"Also, notice that, when, running with any mongodb-based backend, stats figures are cumulative across different executions: if you run it several times, you'll see the stats' figures also include data from previous executions."),Object(s.b)("pre",null,Object(s.b)("code",Object(r.a)({parentName:"pre"},{className:"language-js"}),"const async = require ('async');\n\n// choice of backend\nconst MQ = require ('keuss/backends/bucket-mongo-safe');\n//const MQ = require ('keuss/backends/redis-oq');\n//const MQ = require ('keuss/backends/mongo');\n//const MQ = require ('keuss/backends/ps-mongo');\n\nMQ ({\n url: 'mongodb://localhost/keuss_test'\n}, (err, factory) => {\n if (err) return console.error(err);\n\n const consumers = 3;\n const producers = 3;\n const msgs = 100000;\n\n // factory ready, create one queue\n const q = factory.queue ('test_queue', {});\n\n // show stats every sec\n const timer = setInterval (() => {\n q.stats ((err, res) => console.log (' --\x3e stats now: %o', res));\n }, 1000);\n\n async.parallel ([\n // producers' loop\n cb => async.timesLimit (msgs, producers, (n, next) => {\n q.push ({elem: n, headline: 'something something', tags: {a: 1, b: 2}}, next);\n }, err => {\n console.log ('producer loop ended');\n cb (err);\n }),\n // consumers' loop\n cb => async.timesLimit (msgs, consumers, (n, next) => {\n q.pop ('theconsumer', {reserve: true}, (err, item) => {\n if (err) return cb (err);\n q.ok (item, next);\n });\n }, err => {\n console.log ('consumer loop ended');\n cb (err);\n })\n ], err => {\n if (err) return console.error (err);\n\n clearInterval (timer);\n\n // all loops completed, cleanup & show stats\n async.series ([\n cb => q.drain (cb),\n cb => q.stats (cb),\n cb => setTimeout (cb, 1000),\n cb => q.stats (cb),\n ], (err, res) => {\n if (err) console.error (err);\n else {\n console.log ('stats right after drain: %o', res[1]);\n console.log ('stats once dust settled: %o', res[3]);\n }\n\n factory.close ();\n });\n });\n});\n")))}<span class="cstat-no" title="statement not covered" ></span>u.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 b}</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 p}</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" >s(</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" >c(</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" >s(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" >i(</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>s=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>for(r=0;r<s.length;r++)<span class="cstat-no" title="statement not covered" >t=s[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 s=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>for(r=0;r<s.length;r++)<span class="cstat-no" title="statement not covered" >t=s[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 l=<span class="cstat-no" title="statement not covered" >a.a.createContext({}),</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" >a.a.useContext(l),</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):c(c({},n),e)),t}</span>,</span>b=<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" >u(e.components);<span class="cstat-no" title="statement not covered" ></span>return a.a.createElement(l.Provider,{value:n},e.children)}</span>,</span>d=<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>m=<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>s=<span class="cstat-no" title="statement not covered" >e.originalType,</span>o=<span class="cstat-no" title="statement not covered" >e.parentName,</span>l=<span class="cstat-no" title="statement not covered" >i(e,["components","mdxType","originalType","parentName"]),</span>b=<span class="cstat-no" title="statement not covered" >u(t),</span>m=<span class="cstat-no" title="statement not covered" >r,</span>p=<span class="cstat-no" title="statement not covered" >b["".concat(o,".").concat(m)]||b[m]||d[m]||s;<span class="cstat-no" title="statement not covered" ></span>return t?a.a.createElement(p,c(c({ref:n},l),{},{components:t})):a.a.createElement(p,c({ref:n},l))}</span>));</span>function <span class="fstat-no" title="function not covered" >p(</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 s=<span class="cstat-no" title="statement not covered" >t.length,</span>o=<span class="cstat-no" title="statement not covered" >new Array(s);<span class="cstat-no" title="statement not covered" ></span>o[0]=m;v</span>ar c=<span class="cstat-no" title="statement not covered" >{};<span class="cstat-no" title="statement not covered" ></span>for(var i in n)<span class="cstat-no" title="statement not covered" >hasOwnProperty.call(n,i)&&(c[i]=n[i]);<span class="cstat-no" title="statement not covered" >c</span></span>.originalType=e,c.mdxType="string"==typeof e?e:r,o[1]=c;<span class="cstat-no" title="statement not covered" >f</span>or(var l=<span class="cstat-no" title="statement not covered" >2;</span>l<s;l++)<span class="cstat-no" title="statement not covered" >o[l]=t[l];<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>m.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/build/88c93c54.e868a433.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/build</a> 88c93c54.e868a433.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([[20],{74:<span class="fstat-no" title="function not covered" >fu</span>nction(e){<span class="cstat-no" title="statement not covered" >e.exports=JSON.parse('{"permalink":"/keuss/blog","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"previousPage":null,"nextPage":null,"blogDescription":"Blog"}')}</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/build/8d3e6f9e.aadf6d32.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/build</a> 8d3e6f9e.aadf6d32.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([[21],{75:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,r){"use strict";<span class="cstat-no" title="statement not covered" >r.r(t),r.d(t,"frontMatter",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return s}</span>)),r.d(t,"metadata",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return i}</span>)),r.d(t,"rightToc",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return c}</span>)),r.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 n=<span class="cstat-no" title="statement not covered" >r(2),</span>a=<span class="cstat-no" title="statement not covered" >r(6),</span>o=(<span class="cstat-no" title="statement not covered" >r(0),r(91))</span>,s=<span class="cstat-no" title="statement not covered" >{id:"stats",title:"Stats API",sidebar_label:"Stats"},</span>i=<span class="cstat-no" title="statement not covered" >{unversionedId:"api/stats",id:"api/stats",isDocsHomePage:!1,title:"Stats API",description:"Stats factories",source:"@site/docs/api/stats.md",permalink:"/keuss/docs/api/stats",editUrl:"https://github.com/pepmartinez/keuss/edit/master/website/docs/api/stats.md",sidebar_label:"Stats",sidebar:"someSidebar",previous:{title:"Signaller API",permalink:"/keuss/docs/api/signal"},next:{title:"Queue API",permalink:"/keuss/docs/api/queue"}},</span>c=<span class="cstat-no" title="statement not covered" >[{value:"Stats factories",id:"stats-factories",children:[]}],</span>u=<span class="cstat-no" title="statement not covered" >{rightToc:c};</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>r=<span class="cstat-no" title="statement not covered" >Object(a.a)(e,["components"]);<span class="cstat-no" title="statement not covered" ></span>return Object(o.b)("wrapper",Object(n.a)({},u,r,{components:t,mdxType:"MDXLayout"}),Object(o.b)("h2",{id:"stats-factories"},"Stats factories"),Object(o.b)("p",null,"Stats factories are passed to queues either in queue creation or in backend init, inside ",Object(o.b)("em",{parentName:"p"},"opts.signaller"),". Note that the result of the ",Object(o.b)("inlineCode",{parentName:"p"},"new")," operation is indeed the factory; the result of the ",Object(o.b)("inlineCode",{parentName:"p"},"require")," is therefore a ",Object(o.b)("em",{parentName:"p"},"metafactory")),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"var local_redis_pubsub = require ('keuss/signal/redis-pubsub');\n\nvar local_redis_opts = {\n Redis: {\n port: 6379,\n host: 'localhost',\n db: 6\n }\n};\n\nvar f_opts = {\n stats: {\n provider: signal_redis_pubsub,\n opts: local_redis_opts\n }\n .\n .\n .\n}\n\nMQ (f_opts, (err, factory) => {\n // queues created by factory here will use a redis-backed stats, hosted at redis at localhost, db 6\n})\n")),Object(o.b)("p",null,"Stats objects, as of now, store the number of elements inserted and the number of elements extracted; they are created behind the scenes and tied to queue instances, and the stats-related interface is in fact part of the queues' interface."))}<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,r){"use strict";<span class="cstat-no" title="statement not covered" >r.d(t,"a",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return l}</span>)),r.d(t,"b",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return f}</span>));v</span>ar n=<span class="cstat-no" title="statement not covered" >r(0),</span>a=<span class="cstat-no" title="statement not covered" >r.n(n);</span>function <span class="fstat-no" title="function not covered" >o(</span>e,t,r){<span class="cstat-no" title="statement not covered" >return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}</span>function <span class="fstat-no" title="function not covered" >s(</span>e,t){var r=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var n=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>t&&(n=n.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>))),r.push.apply(r,n)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn r}</span>function <span class="fstat-no" title="function not covered" >i(</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 r=<span class="cstat-no" title="statement not covered" >null!=arguments[t]?arguments[t]:{};<span class="cstat-no" title="statement not covered" ></span>t%2?s(Object(r),!0).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >o(e,t,r[t])}</span>)):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).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(r,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" >c(</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 r,n,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 r,n,a=<span class="cstat-no" title="statement not covered" >{},</span>o=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>for(n=0;n<o.length;n++)<span class="cstat-no" title="statement not covered" >r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);<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 o=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>for(n=0;n<o.length;n++)<span class="cstat-no" title="statement not covered" >r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}<span class="cstat-no" title="statement not covered" ></span></span>r</span>eturn a}</span>var u=<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(u),</span>r=<span class="cstat-no" title="statement not covered" >t;<span class="cstat-no" title="statement not covered" ></span>return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r}</span>,</span>l=<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(u.Provider,{value:t},e.children)}</span>,</span>d=<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>b=<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 r=<span class="cstat-no" title="statement not covered" >e.components,</span>n=<span class="cstat-no" title="statement not covered" >e.mdxType,</span>o=<span class="cstat-no" title="statement not covered" >e.originalType,</span>s=<span class="cstat-no" title="statement not covered" >e.parentName,</span>u=<span class="cstat-no" title="statement not covered" >c(e,["components","mdxType","originalType","parentName"]),</span>l=<span class="cstat-no" title="statement not covered" >p(r),</span>b=<span class="cstat-no" title="statement not covered" >n,</span>f=<span class="cstat-no" title="statement not covered" >l["".concat(s,".").concat(b)]||l[b]||d[b]||o;<span class="cstat-no" title="statement not covered" ></span>return r?a.a.createElement(f,i(i({ref:t},u),{},{components:r})):a.a.createElement(f,i({ref:t},u))}</span>));</span>function <span class="fstat-no" title="function not covered" >f(</span>e,t){var r=<span class="cstat-no" title="statement not covered" >arguments,</span>n=<span class="cstat-no" title="statement not covered" >t&&t.mdxType;<span class="cstat-no" title="statement not covered" ></span>if("string"==typeof e||n){var o=<span class="cstat-no" title="statement not covered" >r.length,</span>s=<span class="cstat-no" title="statement not covered" >new Array(o);<span class="cstat-no" title="statement not covered" ></span>s[0]=b;v</span>ar i=<span class="cstat-no" title="statement not covered" >{};<span class="cstat-no" title="statement not covered" ></span>for(var c in t)<span class="cstat-no" title="statement not covered" >hasOwnProperty.call(t,c)&&(i[c]=t[c]);<span class="cstat-no" title="statement not covered" >i</span></span>.originalType=e,i.mdxType="string"==typeof e?e:n,s[1]=i;<span class="cstat-no" title="statement not covered" >f</span>or(var u=<span class="cstat-no" title="statement not covered" >2;</span>u<o;u++)<span class="cstat-no" title="statement not covered" >s[u]=r[u];<span class="cstat-no" title="statement not covered" >r</span></span>eturn a.a.createElement.apply(null,s)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn a.a.createElement.apply(null,r)}<span class="cstat-no" title="statement not covered" ></span>b.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/build/9bc74468.516633c5.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/build</a> 9bc74468.516633c5.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([[22],{76:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,a){"use strict";<span class="cstat-no" title="statement not covered" >a.r(t),a.d(t,"frontMatter",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return l}</span>)),a.d(t,"metadata",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return c}</span>)),a.d(t,"rightToc",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return o}</span>)),a.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 n=<span class="cstat-no" title="statement not covered" >a(2),</span>i=<span class="cstat-no" title="statement not covered" >a(6),</span>r=(<span class="cstat-no" title="statement not covered" >a(0),a(91))</span>,l=<span class="cstat-no" title="statement not covered" >{id:"queue",title:"Queue API",sidebar_label:"Queue"},</span>c=<span class="cstat-no" title="statement not covered" >{unversionedId:"api/queue",id:"api/queue",isDocsHomePage:!1,title:"Queue API",description:"stats: Queue stats",source:"@site/docs/api/queue.md",permalink:"/keuss/docs/api/queue",editUrl:"https://github.com/pepmartinez/keuss/edit/master/website/docs/api/queue.md",sidebar_label:"Queue",sidebar:"someSidebar",previous:{title:"Stats API",permalink:"/keuss/docs/api/stats"},next:{title:"Examples",permalink:"/keuss/docs/examples"}},</span>o=<span class="cstat-no" title="statement not covered" >[{value:"<code>stats</code>: Queue stats",id:"stats-queue-stats",children:[]},{value:"<code>name</code>: Queue name",id:"name-queue-name",children:[]},{value:"<code>type</code>: Queue type",id:"type-queue-type",children:[]},{value:"<code>size</code>: Queue occupation",id:"size-queue-occupation",children:[]},{value:"<code>totalSize</code>: Total queue occupation",id:"totalsize-total-queue-occupation",children:[]},{value:"<code>schedSize</code>: Size of Scheduled",id:"schedsize-size-of-scheduled",children:[]},{value:"<code>resvSize</code>: Reserved elements size",id:"resvsize-reserved-elements-size",children:[]},{value:"<code>pause</code> / <code>paused</code>: Pause/Resume",id:"pause--paused-pauseresume",children:[]},{value:"<code>next_t</code>: Time of schedule of next message",id:"next_t-time-of-schedule-of-next-message",children:[]},{value:"<code>push</code>: Add element to queue",id:"push-add-element-to-queue",children:[]},{value:"<code>pop</code>: Get element from queue",id:"pop-get-element-from-queue",children:[]},{value:"<code>cancel</code>: Cancel a pending Pop",id:"cancel-cancel-a-pending-pop",children:[]},{value:"<code>ok</code>: Commit a reserved element",id:"ok-commit-a-reserved-element",children:[]},{value:"<code>ko</code>: Roll back a reserved element",id:"ko-roll-back-a-reserved-element",children:[]},{value:"<code>drain</code>: Drain queue",id:"drain-drain-queue",children:[]}],</span>s=<span class="cstat-no" title="statement not covered" >{rightToc:o};</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>a=<span class="cstat-no" title="statement not covered" >Object(i.a)(e,["components"]);<span class="cstat-no" title="statement not covered" ></span>return Object(r.b)("wrapper",Object(n.a)({},s,a,{components:t,mdxType:"MDXLayout"}),Object(r.b)("h3",{id:"stats-queue-stats"},Object(r.b)("inlineCode",{parentName:"h3"},"stats"),": Queue stats"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"q.stats ((err, res) => {\n ...\n})\n")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"res")," contains usage statistics (elements inserted, elements extracted, paused status).")),Object(r.b)("h3",{id:"name-queue-name"},Object(r.b)("inlineCode",{parentName:"h3"},"name"),": Queue name"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"var qname = q.name ()\n")),Object(r.b)("h3",{id:"type-queue-type"},Object(r.b)("inlineCode",{parentName:"h3"},"type"),": Queue type"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"var qtype = q.type ()\n")),Object(r.b)("p",null,"Returns a string with the type of the queue (the type of backend which was used to create it)."),Object(r.b)("h3",{id:"size-queue-occupation"},Object(r.b)("inlineCode",{parentName:"h3"},"size"),": Queue occupation"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"q.size ((err, res) => {\n ...\n})\n")),Object(r.b)("p",null,"Returns the number of elements in the queue that are already elligible (that is, excluding scheduled elements with a schedule time in the future)."),Object(r.b)("h3",{id:"totalsize-total-queue-occupation"},Object(r.b)("inlineCode",{parentName:"h3"},"totalSize"),": Total queue occupation"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"q.totalSize ((err, res) => {\n ...\n})\n")),Object(r.b)("p",null,"Returns the number of elements in the queue (that is, including scheduled elements with a schedule time in the future)."),Object(r.b)("h3",{id:"schedsize-size-of-scheduled"},Object(r.b)("inlineCode",{parentName:"h3"},"schedSize"),": Size of Scheduled"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"q.schedSize ((err, res) => {\n ...\n})\n")),Object(r.b)("p",null,"Returns the number of scheduled elements in the queue (that is, those with a schedule time in the future). Returns 0 if the queue does not support scheduling."),Object(r.b)("h3",{id:"resvsize-reserved-elements-size"},Object(r.b)("inlineCode",{parentName:"h3"},"resvSize"),": Reserved elements size"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"q.resvSize ((err, res) => {\n ...\n})\n")),Object(r.b)("p",null,"Returns the number of reserved elements in the queue. Returns ",Object(r.b)("inlineCode",{parentName:"p"},"null")," if the queue does not support reserve."),Object(r.b)("h3",{id:"pause--paused-pauseresume"},Object(r.b)("inlineCode",{parentName:"h3"},"pause")," / ",Object(r.b)("inlineCode",{parentName:"h3"},"paused"),": Pause/Resume"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"// pauses the queue\nq.pause (true)\n\n// resumes the queue\nq.pause (false)\n\n// gets paused status of queue\nq.paused ((err, is_paused) => {\n ...\n})\n")),Object(r.b)("p",null,"Pauses/Resumes all consumers on this queue (calls to ",Object(r.b)("inlineCode",{parentName:"p"},"pop()"),"). Producers are not afected (calls to ",Object(r.b)("inlineCode",{parentName:"p"},"push()"),")."),Object(r.b)("p",null,"The pause/resume condition is propagated via the signallers, so this affects all consumers, not only those local to the process, if a redis-pubsub or mongo-capped signaller is used."),Object(r.b)("p",null,"Also, the paused condition is stored as stats, so any new call to ",Object(r.b)("inlineCode",{parentName:"p"},"pop()")," will honor it."),Object(r.b)("h3",{id:"next_t-time-of-schedule-of-next-message"},Object(r.b)("inlineCode",{parentName:"h3"},"next_t"),": Time of schedule of next message"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"q.next_t ((err, res) => {\n ...\n})\n")),Object(r.b)("p",null,"Returns a ",Object(r.b)("inlineCode",{parentName:"p"},"Date"),", or ",Object(r.b)("inlineCode",{parentName:"p"},"null")," if queue is empty. Queues with no support for schedule/delay always return `null "),Object(r.b)("h3",{id:"push-add-element-to-queue"},Object(r.b)("inlineCode",{parentName:"h3"},"push"),": Add element to queue"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"q.push (payload, [opts,] (err, res) => {\n ...\n})\n")),Object(r.b)("p",null,"Adds payload to the queue and calls passed callback upon completion. Callback's ",Object(r.b)("em",{parentName:"p"},"res")," will contain the id assigned to the inserted element, if the backup provides one."),Object(r.b)("p",null,"Possible opts:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"mature"),": unix timestamp where the element would be elligible for extraction. It is guaranteed that the element won't be extracted before this time."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"delay"),": delay in seconds to calculate the mature timestamp, if mature is not provided. For example, a delay=120 guarantees the element won't be extracted until 120 secs have elapsed ",Object(r.b)("em",{parentName:"li"},"at least"),"."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"tries"),": value to initialize the retry counter, defaults to 0 (still no retries).")),Object(r.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(r.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(r.b)("h5",{parentName:"div"},Object(r.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(r.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(r.b)("path",Object(n.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(n.a)({parentName:"div"},{className:"admonition-content"}),Object(r.b)("p",{parentName:"div"},Object(r.b)("strong",{parentName:"p"},"mature")," and ",Object(r.b)("strong",{parentName:"p"},"delay")," have no effect if the backend does not support delay/schedule."))),Object(r.b)("h3",{id:"pop-get-element-from-queue"},Object(r.b)("inlineCode",{parentName:"h3"},"pop"),": Get element from queue"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"var tr = q.pop (cid, [opts,] (err, res) => {\n ...\n})\n")),Object(r.b)("p",null,"Obtains an element from the queue. Callback is called with the element obtained if any, or if an error happened. If defined, the operation will wait for ",Object(r.b)("inlineCode",{parentName:"p"},"opts.timeout")," seconds for an element to appear in the queue before bailing out (with both ",Object(r.b)("inlineCode",{parentName:"p"},"err")," and ",Object(r.b)("inlineCode",{parentName:"p"},"res")," being null). However, it immediately returns an id that can be used to cancel the operation at anytime."),Object(r.b)("p",null,Object(r.b)("inlineCode",{parentName:"p"},"*cid*")," is an string that identifies the consumer entity; it is used only for debugging purposes."),Object(r.b)("p",null,"Possible opts:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"timeout"),": milliseconds to wait for an elligible element to appear in the queue to be returned. If not defined it will wait forever"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"reserve"),": if ",Object(r.b)("inlineCode",{parentName:"li"},"true")," the element is only reserved, not completely returned. This means either ",Object(r.b)("em",{parentName:"li"},"ok")," or ",Object(r.b)("em",{parentName:"li"},"ko")," operations are needed upon the obtained element once processed, otherwise the element will be rolled back (and made available again) at some point in the future (this is only available on backends capable of reserve/commit).")),Object(r.b)("h3",{id:"cancel-cancel-a-pending-pop"},Object(r.b)("inlineCode",{parentName:"h3"},"cancel"),": Cancel a pending Pop"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"var tr = q.pop (cid, opts, (err, res) => {...});\n.\n.\n.\nq.cancel (tr);\n")),Object(r.b)("p",null,"Cancels a pending ",Object(r.b)("inlineCode",{parentName:"p"},"pop")," operation, identified by the value returned by ",Object(r.b)("inlineCode",{parentName:"p"},"pop()")),Object(r.b)("p",null,"If no ",Object(r.b)("inlineCode",{parentName:"p"},"tr")," param is passed, or it is ",Object(r.b)("inlineCode",{parentName:"p"},"null"),", all pending ",Object(r.b)("inlineCode",{parentName:"p"},"pop")," operations on the queue are cancelled. Cancelled ",Object(r.b)("inlineCode",{parentName:"p"},"pop")," operations will get ",Object(r.b)("inlineCode",{parentName:"p"},"'cancel'")," (a string) in the ",Object(r.b)("inlineCode",{parentName:"p"},"error")," parameter value of the callback."),Object(r.b)("h3",{id:"ok-commit-a-reserved-element"},Object(r.b)("inlineCode",{parentName:"h3"},"ok"),": Commit a reserved element"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"q.ok (id, (err, res) => {\n ...\n})\n")),Object(r.b)("p",null,"Commits a reserved element by its id (the id would be assigned to ",Object(r.b)("inlineCode",{parentName:"p"},"res._id")," on the ",Object(r.b)("inlineCode",{parentName:"p"},"res")," param of ",Object(r.b)("inlineCode",{parentName:"p"},"pop()")," operation). This effectively erases the element from the queue."),Object(r.b)("p",null,"Alternatively, you can pass the entire ",Object(r.b)("inlineCode",{parentName:"p"},"res")," object from the ",Object(r.b)("inlineCode",{parentName:"p"},"pop()")," operation:"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"var tr = q.pop ('my-consumer-id', {reserve: true}, (err, res) => {\n // do something with res\n ...\n\n // commit it\n q.ok (res, (err, res) => {\n ...\n });\n});\n")),Object(r.b)("h3",{id:"ko-roll-back-a-reserved-element"},Object(r.b)("inlineCode",{parentName:"h3"},"ko"),": Roll back a reserved element"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"q.ko (id, next_t, (err, res) => {\n ...\n})\n")),Object(r.b)("p",null,"Rolls back a reserved element by its id (the id would be at ",Object(r.b)("inlineCode",{parentName:"p"},"res._id")," on the ",Object(r.b)("inlineCode",{parentName:"p"},"res")," param of ",Object(r.b)("inlineCode",{parentName:"p"},"pop()")," operation). This effectively makes the element available again at the queue, marking it to be mature at ",Object(r.b)("inlineCode",{parentName:"p"},"next_t")," (",Object(r.b)("inlineCode",{parentName:"p"},"next_t")," being a millsec-unixtime). If no ",Object(r.b)("inlineCode",{parentName:"p"},"next_t")," is specified or a ",Object(r.b)("inlineCode",{parentName:"p"},"null")," is passed, ",Object(r.b)("inlineCode",{parentName:"p"},"now()")," is assumed."),Object(r.b)("p",null,"As with ",Object(r.b)("inlineCode",{parentName:"p"},"ok()"),", you can use the entire ",Object(r.b)("inlineCode",{parentName:"p"},"res")," object instead:"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"var tr = q.pop ('my-consumer-id', {reserve: true}, (err, res) => {\n // do something with res\n ...\n\n // commit or rollback it\n if (succeed) q.ok (res, (err, res) => {\n ...\n })\n else q.ko (res, (err, res) => {\n ...\n })\n});\n")),Object(r.b)("div",{className:"admonition admonition-important alert alert--info"},Object(r.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(r.b)("h5",{parentName:"div"},Object(r.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(r.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(r.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),"important")),Object(r.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(r.b)("p",{parentName:"div"},"You must pass the entire ",Object(r.b)("inlineCode",{parentName:"p"},"res")," object for the ",Object(r.b)("a",Object(n.a)({parentName:"p"},{href:"../api/factory#dead-letter"}),"deadletter")," feature to work; even if activated at the factory, ",Object(r.b)("inlineCode",{parentName:"p"},"ko()")," will not honor deadletter if you only pass the ",Object(r.b)("inlineCode",{parentName:"p"},"res._id")," as ",Object(r.b)("inlineCode",{parentName:"p"},"id"),"."))),Object(r.b)("h3",{id:"drain-drain-queue"},Object(r.b)("inlineCode",{parentName:"h3"},"drain"),": Drain queue"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"q.drain (err => {\n ...\n})\n")),Object(r.b)("p",null,"Drains a queue. This is a needed operation when a backend does read-ahead upon a ",Object(r.b)("inlineCode",{parentName:"p"},"pop()"),", or buffers ",Object(r.b)("inlineCode",{parentName:"p"},"push()")," operations for later; in this case, you may want to be sure that all extra elemens read are actually popped, and all pending pushes are committed."),Object(r.b)("div",{className:"admonition admonition-warning alert alert--danger"},Object(r.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(r.b)("h5",{parentName:"div"},Object(r.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(r.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"}),Object(r.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})))),"warning")),Object(r.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(r.b)("p",{parentName:"div"},"'drain' will immediately inhibit ",Object(r.b)("inlineCode",{parentName:"p"},"push()"),": any call to ",Object(r.b)("inlineCode",{parentName:"p"},"push()")," will immediately result in a ",Object(r.b)("inlineCode",{parentName:"p"},"'drain'")," (a string) in the ",Object(r.b)("inlineCode",{parentName:"p"},"error")," parameter value of the callback. The callback will be called when all pending pushes are committed, and all read-ahead on a pop() has been actually popped."))),Object(r.b)("p",null,"Also, ",Object(r.b)("inlineCode",{parentName:"p"},"drain()")," will also call ",Object(r.b)("inlineCode",{parentName:"p"},"cancel()")," on the queue immediately before finishing, in case of success."))}<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,a){"use strict";<span class="cstat-no" title="statement not covered" >a.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>)),a.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 n=<span class="cstat-no" title="statement not covered" >a(0),</span>i=<span class="cstat-no" title="statement not covered" >a.n(n);</span>function <span class="fstat-no" title="function not covered" >r(</span>e,t,a){<span class="cstat-no" title="statement not covered" >return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}</span>function <span class="fstat-no" title="function not covered" >l(</span>e,t){var a=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var n=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>t&&(n=n.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>))),a.push.apply(a,n)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn a}</span>function <span class="fstat-no" title="function not covered" >c(</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 a=<span class="cstat-no" title="statement not covered" >null!=arguments[t]?arguments[t]:{};<span class="cstat-no" title="statement not covered" ></span>t%2?l(Object(a),!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,a[t])}</span>)):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).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(a,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" >o(</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 a,n,i=<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 a,n,i=<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(n=0;n<r.length;n++)<span class="cstat-no" title="statement not covered" >a=r[n],t.indexOf(a)>=0||(i[a]=e[a]);<span class="cstat-no" title="statement not covered" >r</span></span>eturn i}</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(n=0;n<r.length;n++)<span class="cstat-no" title="statement not covered" >a=r[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}<span class="cstat-no" title="statement not covered" ></span></span>r</span>eturn i}</span>var s=<span class="cstat-no" title="statement not covered" >i.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" >i.a.useContext(s),</span>a=<span class="cstat-no" title="statement not covered" >t;<span class="cstat-no" title="statement not covered" ></span>return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a}</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 i.a.createElement(s.Provider,{value:t},e.children)}</span>,</span>d=<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 i.a.createElement(i.a.Fragment,{},t)}</span>},</span>u=<span class="cstat-no" title="statement not covered" >i.a.forwardRef((<span class="fstat-no" title="function not covered" >fu</span>nction(e,t){var a=<span class="cstat-no" title="statement not covered" >e.components,</span>n=<span class="cstat-no" title="statement not covered" >e.mdxType,</span>r=<span class="cstat-no" title="statement not covered" >e.originalType,</span>l=<span class="cstat-no" title="statement not covered" >e.parentName,</span>s=<span class="cstat-no" title="statement not covered" >o(e,["components","mdxType","originalType","parentName"]),</span>b=<span class="cstat-no" title="statement not covered" >p(a),</span>u=<span class="cstat-no" title="statement not covered" >n,</span>m=<span class="cstat-no" title="statement not covered" >b["".concat(l,".").concat(u)]||b[u]||d[u]||r;<span class="cstat-no" title="statement not covered" ></span>return a?i.a.createElement(m,c(c({ref:t},s),{},{components:a})):i.a.createElement(m,c({ref:t},s))}</span>));</span>function <span class="fstat-no" title="function not covered" >m(</span>e,t){var a=<span class="cstat-no" title="statement not covered" >arguments,</span>n=<span class="cstat-no" title="statement not covered" >t&&t.mdxType;<span class="cstat-no" title="statement not covered" ></span>if("string"==typeof e||n){var r=<span class="cstat-no" title="statement not covered" >a.length,</span>l=<span class="cstat-no" title="statement not covered" >new Array(r);<span class="cstat-no" title="statement not covered" ></span>l[0]=u;v</span>ar c=<span class="cstat-no" title="statement not covered" >{};<span class="cstat-no" title="statement not covered" ></span>for(var o in t)<span class="cstat-no" title="statement not covered" >hasOwnProperty.call(t,o)&&(c[o]=t[o]);<span class="cstat-no" title="statement not covered" >c</span></span>.originalType=e,c.mdxType="string"==typeof e?e:n,l[1]=c;<span class="cstat-no" title="statement not covered" >f</span>or(var s=<span class="cstat-no" title="statement not covered" >2;</span>s<r;s++)<span class="cstat-no" title="statement not covered" >l[s]=a[s];<span class="cstat-no" title="statement not covered" >r</span></span>eturn i.a.createElement.apply(null,l)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn i.a.createElement.apply(null,a)}<span class="cstat-no" title="statement not covered" ></span>u.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>
|