@toa.io/extensions.cadence 1.0.0-alpha.298 → 1.0.0-alpha.299
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/components/cadence.metronome/manifest.toa.yaml +12 -0
- package/components/cadence.metronome/operations/delay.js +3 -0
- package/components/cadence.metronome/types/toa.d.ts +8 -4
- package/package.json +5 -5
- package/readme.md +61 -0
- package/transpiled/Aspect.js +10 -1
- package/transpiled/Aspect.js.map +1 -1
- package/transpiled/Dispatcher.d.ts +6 -0
- package/transpiled/Dispatcher.js +40 -11
- package/transpiled/Dispatcher.js.map +1 -1
- package/transpiled/Local.js +3 -1
- package/transpiled/Local.js.map +1 -1
|
@@ -23,6 +23,14 @@ entity:
|
|
|
23
23
|
request:
|
|
24
24
|
description: The request to make, as it was handed over
|
|
25
25
|
type: object
|
|
26
|
+
trail:
|
|
27
|
+
description: >
|
|
28
|
+
The chain of hops that asked for the call, which the call is then made by. A delay is a
|
|
29
|
+
hop like any other, so a circle routed through one is still a circle. Absent where the
|
|
30
|
+
caller detached the call, and on a row written before this existed.
|
|
31
|
+
type: array
|
|
32
|
+
items:
|
|
33
|
+
type: string
|
|
26
34
|
required:
|
|
27
35
|
- lane
|
|
28
36
|
- due
|
|
@@ -41,6 +49,10 @@ operations:
|
|
|
41
49
|
pattern: ^[a-zA-Z][a-zA-Z0-9]*\.[a-zA-Z][a-zA-Z0-9]*\.[a-zA-Z][_a-zA-Z0-9]*$
|
|
42
50
|
request:
|
|
43
51
|
type: object
|
|
52
|
+
trail:
|
|
53
|
+
type: array
|
|
54
|
+
items:
|
|
55
|
+
type: string
|
|
44
56
|
interval:
|
|
45
57
|
description: Milliseconds from now
|
|
46
58
|
type: integer
|
|
@@ -24,5 +24,8 @@ export function transition(input, object) {
|
|
|
24
24
|
// there at all, and a null would not fit it
|
|
25
25
|
if (input.request !== undefined) object.request = input.request
|
|
26
26
|
|
|
27
|
+
// the chain that asked for the call, absent where the caller detached it
|
|
28
|
+
if (input.trail !== undefined) object.trail = input.trail
|
|
29
|
+
|
|
27
30
|
return object.id
|
|
28
31
|
}
|
|
@@ -15,16 +15,20 @@ export interface Entity {
|
|
|
15
15
|
endpoint: string
|
|
16
16
|
/** The request to make, as it was handed over */
|
|
17
17
|
request?: Record<string, unknown>
|
|
18
|
+
/** The chain of hops that asked for the call, which the call is then made by. A delay is a hop like any other, so a circle routed through one is still a circle. Absent where the caller detached the call, and on a row written before this existed. */
|
|
19
|
+
trail?: string[]
|
|
18
20
|
id: string
|
|
19
|
-
VERSION
|
|
20
|
-
CREATED
|
|
21
|
-
UPDATED
|
|
22
|
-
DELETED
|
|
21
|
+
VERSION: number
|
|
22
|
+
CREATED: number
|
|
23
|
+
UPDATED: number
|
|
24
|
+
DELETED: number | null
|
|
25
|
+
REGION: number
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
export type DelayInput = {
|
|
26
29
|
endpoint: string
|
|
27
30
|
request?: Record<string, unknown>
|
|
31
|
+
trail?: string[]
|
|
28
32
|
/** Milliseconds from now */
|
|
29
33
|
interval: number
|
|
30
34
|
/** Milliseconds the call may be late and still be made, or null for no bound. Stated rather than defaulted: only the caller knows whether a late call is still the right call. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/extensions.cadence",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.299",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Toa Schedule",
|
|
6
6
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"!**/.env*"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@toa.io/core": "1.0.0-alpha.
|
|
30
|
-
"@toa.io/definitions": "1.0.0-alpha.
|
|
29
|
+
"@toa.io/core": "1.0.0-alpha.299",
|
|
30
|
+
"@toa.io/definitions": "1.0.0-alpha.299",
|
|
31
31
|
"@toa.io/generic": "1.0.0-alpha.292",
|
|
32
|
-
"@toa.io/schemas": "1.0.0-alpha.
|
|
32
|
+
"@toa.io/schemas": "1.0.0-alpha.299",
|
|
33
33
|
"openspan": "1.0.0-alpha.293"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"transpile": "tsc"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "2ba95b16f2cf06f82d6ff8d436761e843e5e4b43"
|
|
39
39
|
}
|
package/readme.md
CHANGED
|
@@ -96,10 +96,43 @@ await context.delay.cancel(id)
|
|
|
96
96
|
| ---------- | --------------------------------------------------------------------------- |
|
|
97
97
|
| `interval` | milliseconds from now |
|
|
98
98
|
| `overdue` | milliseconds the call may be late and still be made, or `null` for no bound |
|
|
99
|
+
| `detached` | whether the call begins a chain of its own; see below |
|
|
99
100
|
|
|
100
101
|
The call is made once the delay has passed, and waits for the target where it is not there to
|
|
101
102
|
take it. The id it answers cancels it, and `cancel` raises where the id was never issued.
|
|
102
103
|
|
|
104
|
+
### A delay is a hop
|
|
105
|
+
|
|
106
|
+
The call is made by the chain that asked for it, so an operation that delays a call to itself is
|
|
107
|
+
going round in a circle and is refused on its third round — see
|
|
108
|
+
[call cycles](/documentation/cycles.md). A delay makes it a slow circle rather than not one.
|
|
109
|
+
|
|
110
|
+
Nothing here repeats a call: a delayed call is made **once**, and `detached` does not change
|
|
111
|
+
that. What repeats is an operation that re-arms itself, and `detached: true` is how that
|
|
112
|
+
operation says the call it is arming begins a chain of its own rather than continuing the one it
|
|
113
|
+
is running in:
|
|
114
|
+
|
|
115
|
+
```javascript
|
|
116
|
+
// billing.dunning.chase — arms the next chase as it finishes this one
|
|
117
|
+
export async function effect (input, context) {
|
|
118
|
+
await chase(input.invoice)
|
|
119
|
+
|
|
120
|
+
await context.delay(
|
|
121
|
+
'billing.dunning.chase',
|
|
122
|
+
{ input },
|
|
123
|
+
{ interval: DAY, overdue: null, detached: true }
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Without it the second chase is hop two of one chain and the third is refused. With it each chase
|
|
129
|
+
is its own chain, and they go on for as long as the operation keeps arming them.
|
|
130
|
+
|
|
131
|
+
A [pulse](#pulse) is the other way to write recurring work, and where it fits it is the simpler
|
|
132
|
+
one: one timer for the component rather than a row per item, and no chain to detach, because it
|
|
133
|
+
is called from the clock. Reach for a delay instead when each item has its own schedule — this
|
|
134
|
+
invoice a day from now, that one in a week.
|
|
135
|
+
|
|
103
136
|
Nothing is declared for it beyond naming the extension. A component that only delays calls says
|
|
104
137
|
so with an empty declaration:
|
|
105
138
|
|
|
@@ -194,9 +227,37 @@ may no longer be one it accepts. Either way the attempt is spent.
|
|
|
194
227
|
# context.toa.yaml
|
|
195
228
|
cadence:
|
|
196
229
|
discreteness: 60 # seconds between passes over the calls waiting to be made
|
|
230
|
+
regions: [0] # the regions whose calls this deployment makes, by rank
|
|
197
231
|
```
|
|
198
232
|
|
|
199
233
|
`discreteness` is how often the calls waiting to be made are looked over. It defaults to 60,
|
|
200
234
|
which is what an application that states nothing gets. It sets how small an `overdue` is worth
|
|
201
235
|
stating, and it is the floor under how closely a delayed call can be cancelled — see
|
|
202
236
|
[Discreteness](#discreteness) — and lowering it costs a pass that runs more often.
|
|
237
|
+
|
|
238
|
+
### Regions
|
|
239
|
+
|
|
240
|
+
An application deployed as [several regions](/extensions/convergence) holds every region's
|
|
241
|
+
delayed calls in every one of them, and each makes only its own: a row says which region asked
|
|
242
|
+
for the call, and a deployment makes the calls of the region it is. So there is nothing to state
|
|
243
|
+
for this to be right, and a single-region application never meets it.
|
|
244
|
+
|
|
245
|
+
**`regions` is how a region that is gone is taken over.** Redeploy a surviving region naming the
|
|
246
|
+
lost one's rank beside its own, and it makes both:
|
|
247
|
+
|
|
248
|
+
```yaml
|
|
249
|
+
cadence:
|
|
250
|
+
regions: [0, 1] # this region's calls, and those of the region that was 1
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
What it takes over it keeps: settling a call stamps the region that settled it, so the rows move
|
|
254
|
+
across for good and the configuration can go back to naming one rank once they have.
|
|
255
|
+
|
|
256
|
+
**Two regions naming one rank make every one of its calls twice**, and nothing detects it —
|
|
257
|
+
the same hazard as two regions given one `priority`, and the same answer: the table is written
|
|
258
|
+
once and deployed everywhere.
|
|
259
|
+
|
|
260
|
+
**A cancellation crosses regions.** `cancel` is a write like any other, so it reaches the region
|
|
261
|
+
that owns the call by convergence — bounded by the link, on top of the `discreteness` race that
|
|
262
|
+
is there anyway.
|
|
263
|
+
|
package/transpiled/Aspect.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Connector } from '@toa.io/core';
|
|
1
|
+
import { Connector, trail } from '@toa.io/core';
|
|
2
2
|
/**
|
|
3
3
|
* `context.delay(endpoint, request, delay)` — a call to be made later, handed to the component
|
|
4
4
|
* that keeps them.
|
|
@@ -38,6 +38,15 @@ export class Aspect extends Connector {
|
|
|
38
38
|
// a call that takes no request carries none, rather than a null one
|
|
39
39
|
if (request !== null && request !== undefined)
|
|
40
40
|
input.request = request;
|
|
41
|
+
/*
|
|
42
|
+
* A delay is a hop, so the chain that asked for the call is stored with it and the call is
|
|
43
|
+
* made by it — otherwise a circle routed through `context.delay` would be one nothing sees.
|
|
44
|
+
* It rides the row rather than the request, because the request is the caller's and a call
|
|
45
|
+
* that carries none must go on carrying none.
|
|
46
|
+
*/
|
|
47
|
+
const hops = options.detached === true ? undefined : trail.current();
|
|
48
|
+
if (hops !== undefined)
|
|
49
|
+
input.trail = hops;
|
|
41
50
|
return await this.metronome.invoke('delay', { input });
|
|
42
51
|
}
|
|
43
52
|
/**
|
package/transpiled/Aspect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Aspect.js","sourceRoot":"","sources":["../source/Aspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,c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Q,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,CAAA;QAEpE,IAAI,IAAI,KAAK,SAAS;YAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAA;QAE1C,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IACxD,CAAC;IAED;;;;OAIG;IACK,KAAK,CAAC,MAAM,CAAC,EAAU;QAC7B,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IACjF,CAAC;CACF"}
|
|
@@ -25,6 +25,12 @@ export declare class Dispatcher extends Connector {
|
|
|
25
25
|
private readonly targets;
|
|
26
26
|
/** milliseconds between passes, and how far ahead each one reaches */
|
|
27
27
|
private readonly discreteness;
|
|
28
|
+
/**
|
|
29
|
+
* The ranks whose calls this deployment makes. Where an application converges, every region
|
|
30
|
+
* holds every region's rows, and a row is called by the one that asked for it — read once,
|
|
31
|
+
* because what a deployment is is not a thing that changes under it.
|
|
32
|
+
*/
|
|
33
|
+
private readonly regions;
|
|
28
34
|
private timer?;
|
|
29
35
|
private off?;
|
|
30
36
|
private scanning;
|
package/transpiled/Dispatcher.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { console } from 'openspan';
|
|
2
|
-
import { Connector, Locator } from '@toa.io/core';
|
|
3
|
-
import { BATCH, DISCRETENESS, LANES, number } from '@toa.io/definitions/extensions.cadence';
|
|
2
|
+
import { Connector, Locator, exceptions } from '@toa.io/core';
|
|
3
|
+
import { BATCH, DISCRETENESS, LANES, number, regions } from '@toa.io/definitions/extensions.cadence';
|
|
4
4
|
/**
|
|
5
5
|
* Makes the calls that were put off.
|
|
6
6
|
*
|
|
@@ -25,6 +25,12 @@ export class Dispatcher extends Connector {
|
|
|
25
25
|
targets = new Set();
|
|
26
26
|
/** milliseconds between passes, and how far ahead each one reaches */
|
|
27
27
|
discreteness;
|
|
28
|
+
/**
|
|
29
|
+
* The ranks whose calls this deployment makes. Where an application converges, every region
|
|
30
|
+
* holds every region's rows, and a row is called by the one that asked for it — read once,
|
|
31
|
+
* because what a deployment is is not a thing that changes under it.
|
|
32
|
+
*/
|
|
33
|
+
regions;
|
|
28
34
|
timer;
|
|
29
35
|
off;
|
|
30
36
|
scanning = false;
|
|
@@ -37,6 +43,7 @@ export class Dispatcher extends Connector {
|
|
|
37
43
|
this.resolve = resolve;
|
|
38
44
|
this.atom = atom;
|
|
39
45
|
this.discreteness = number('TOA_CADENCE_DISCRETENESS', DISCRETENESS * 1000);
|
|
46
|
+
this.regions = regions();
|
|
40
47
|
this.depends(metronome);
|
|
41
48
|
this.depends(atom);
|
|
42
49
|
}
|
|
@@ -131,9 +138,19 @@ export class Dispatcher extends Connector {
|
|
|
131
138
|
const until = now + 2 * this.discreteness;
|
|
132
139
|
const rows = (await this.metronome.invoke('enumerate', {
|
|
133
140
|
query: {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
141
|
+
/*
|
|
142
|
+
* Expiry is not a criterion: a row nobody reads is a row nobody settles, and it would
|
|
143
|
+
* stay live for good. It is read, and settled without the call being made.
|
|
144
|
+
*
|
|
145
|
+
* `REGION` is not in `index_due` and is not going into it: the scan asks for its lanes
|
|
146
|
+
* as a set, and a second set would be explored as the product of the two — past the
|
|
147
|
+
* hundred-odd scans MongoDB explodes before it gives up and sorts in memory, which is
|
|
148
|
+
* what that index exists to avoid. So it is read off the rows the index found, and a
|
|
149
|
+
* region pays for the rows of the others that fall in its window.
|
|
150
|
+
*/
|
|
151
|
+
criteria: `lane=in=(${lanes.join(',')});` +
|
|
152
|
+
`REGION=in=(${this.regions.join(',')});` +
|
|
153
|
+
`due<${until}`,
|
|
137
154
|
sort: ['due:asc'],
|
|
138
155
|
limit: BATCH
|
|
139
156
|
}
|
|
@@ -209,26 +226,38 @@ export class Dispatcher extends Connector {
|
|
|
209
226
|
}
|
|
210
227
|
const [namespace, name, endpoint] = row.endpoint.split('.');
|
|
211
228
|
const local = this.target(new Locator(name, namespace));
|
|
229
|
+
const request = { input: null, ...row.request, task: true };
|
|
212
230
|
/*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
231
|
+
* Set after the stored request is spread, so a stored field of that name cannot stand in
|
|
232
|
+
* for it: the row's chain is the one that was in scope when the call was asked for. Absent
|
|
233
|
+
* — the caller detached the call — `Call` starts one under cadence's own name.
|
|
216
234
|
*/
|
|
217
|
-
|
|
235
|
+
if (row.trail !== undefined)
|
|
236
|
+
request.trail = row.trail;
|
|
218
237
|
/*
|
|
219
238
|
* The call travels as a task, so what raises here is this side of it: a stored request the
|
|
220
239
|
* target's contract no longer fits, an endpoint it no longer has, a broker that refused the
|
|
221
240
|
* enqueue. What the operation itself does with it happens in the target's own process and
|
|
222
241
|
* never comes back.
|
|
223
242
|
*
|
|
224
|
-
*
|
|
243
|
+
* A row is settled by the outcome, not by the attempt. One the target will never accept is
|
|
244
|
+
* settled at once, because a request its schema no longer fits never becomes one it does.
|
|
245
|
+
* One that failed on the way out is left where it is, and the next scan calls again — a
|
|
246
|
+
* broker that was briefly not there is not a reason to drop a call somebody asked for, and
|
|
247
|
+
* the bound on trying is the `overdue` its caller gave it.
|
|
225
248
|
*/
|
|
226
249
|
await local
|
|
227
|
-
.invoke(endpoint,
|
|
250
|
+
.invoke(endpoint, request)
|
|
251
|
+
.then(() => {
|
|
252
|
+
this.called.add(row.id);
|
|
253
|
+
})
|
|
228
254
|
.catch((error) => {
|
|
255
|
+
if (exceptions.permanent(error))
|
|
256
|
+
this.called.add(row.id);
|
|
229
257
|
console.error('Delayed call failed', {
|
|
230
258
|
endpoint: row.endpoint,
|
|
231
259
|
id: row.id,
|
|
260
|
+
permanent: exceptions.permanent(error),
|
|
232
261
|
error
|
|
233
262
|
});
|
|
234
263
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dispatcher.js","sourceRoot":"","sources":["../source/Dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"Dispatcher.js","sourceRoot":"","sources":["../source/Dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EACL,KAAK,EACL,YAAY,EACZ,KAAK,EACL,MAAM,EACN,OAAO,EACR,MAAM,wCAAwC,CAAA;AAI/C;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,UAAW,SAAQ,SAAS;IACtB,SAAS,CAAO;IAChB,OAAO,CAA6B;IACpC,IAAI,CAAgB;IAErC,0FAA0F;IACzE,KAAK,GAAG,IAAI,GAAG,EAAiB,CAAA;IAEjD,qEAAqE;IAC7D,MAAM,GAAG,IAAI,GAAG,EAAU,CAAA;IAElC,oEAAoE;IACnD,OAAO,GAAG,IAAI,GAAG,EAAS,CAAA;IAE3C,sEAAsE;IACrD,YAAY,CAAQ;IAErC;;;;OAIG;IACc,OAAO,CAAU;IAE1B,KAAK,CAAiB;IACtB,GAAG,CAAa;IAChB,QAAQ,GAAG,KAAK,CAAA;IAChB,OAAO,GAAG,KAAK,CAAA;IAEvB,sFAAsF;IAC9E,OAAO,GAAG,CAAC,CAAA;IAEnB,YACE,SAAgB,EAChB,OAAoC,EACpC,IAAoB;QAEpB,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QA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,sCAAsC;aACrC,OAAO,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAC3B,CAAC,CAAC,CAAA;IACN,CAAC;IAED;;;OAGG;IACK,MAAM,CAAC,OAAgB;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAEnC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YACvB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QACrB,CAAC;QAED,OAAO,KAAK,CAAA;IACd,CAAC;IAED,6FAA6F;IACrF,KAAK,CAAC,MAAM;QAClB,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC;YAAE,OAAM;QAElC,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAA;QAE5B,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QAEtE,0FAA0F;QAC1F,KAAK,MAAM,EAAE,IAAI,GAAG;YAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IAC9C,CAAC;CACF;AAsBD,oFAAoF;AACpF,MAAM,OAAO,GAAG,CAAC,CAAA"}
|
package/transpiled/Local.js
CHANGED
|
@@ -20,10 +20,12 @@ export class Local extends Connector {
|
|
|
20
20
|
return await (await this.remote).invoke(endpoint, request);
|
|
21
21
|
}
|
|
22
22
|
async locate() {
|
|
23
|
-
const remote = await this.host.remote(this.locator);
|
|
23
|
+
const remote = await this.host.remote(this.locator, SOURCE);
|
|
24
24
|
this.depends(remote);
|
|
25
25
|
await remote.connect();
|
|
26
26
|
return remote;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
+
// what a pulse and a delayed call are made by; without it they arrive unattributed
|
|
30
|
+
const SOURCE = { service: 'cadence' };
|
|
29
31
|
//# sourceMappingURL=Local.js.map
|
package/transpiled/Local.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Local.js","sourceRoot":"","sources":["../source/Local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC;;;;;;GAMG;AACH,MAAM,OAAO,KAAM,SAAQ,SAAS;IACjB,IAAI,CAAM;IACV,OAAO,CAAS;IACzB,MAAM,CAAkB;IAEhC,YAAmB,IAAU,EAAE,OAAgB;QAC7C,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,OAAgB;QACpD,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,EAAE,CAAA;QAE7B,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;IAC5D,CAAC;IAEO,KAAK,CAAC,MAAM;QAClB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"Local.js","sourceRoot":"","sources":["../source/Local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC;;;;;;GAMG;AACH,MAAM,OAAO,KAAM,SAAQ,SAAS;IACjB,IAAI,CAAM;IACV,OAAO,CAAS;IACzB,MAAM,CAAkB;IAEhC,YAAmB,IAAU,EAAE,OAAgB;QAC7C,KAAK,EAAE,CAAA;QAE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