cry-ebus2 3.0.2 → 3.0.7
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/dist/test/echo.js +5 -4
- package/dist/test/echo.js.map +1 -1
- package/dist/test/pack.js +1400 -1
- package/dist/test/pack.js.map +1 -1
- package/dist/test/services.js +10 -6
- package/dist/test/services.js.map +1 -1
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js.map +1 -1
- package/package.json +6 -6
- package/src/test/echo.ts +5 -6
- package/src/test/pack.ts +1421 -1
- package/src/test/services.ts +13 -7
- package/src/worker.ts +0 -1
package/src/test/services.ts
CHANGED
|
@@ -7,18 +7,24 @@ import { Broker, DelayWorker } from "../index";
|
|
|
7
7
|
describe('services', async function () {
|
|
8
8
|
|
|
9
9
|
this.timeout(4000)
|
|
10
|
+
let client = new Client()
|
|
11
|
+
let echo : any = undefined
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
it('should start services', async () => {
|
|
14
|
+
|
|
15
|
+
new Broker().start()
|
|
16
|
+
echo = new EchoWorker()
|
|
17
|
+
echo.start()
|
|
18
|
+
new DelayWorker().start()
|
|
19
|
+
new DelayWorker().start()
|
|
20
|
+
new DelayWorker().start()
|
|
21
|
+
});
|
|
17
22
|
|
|
18
|
-
let client = new Client()
|
|
19
23
|
|
|
20
24
|
it('should return services', async () => {
|
|
21
25
|
let rep = await client.services()
|
|
26
|
+
console.log('rep',rep);
|
|
27
|
+
|
|
22
28
|
expect(rep.find( (n:any) => n.name==="echo").nWorkers).to.eq(1)
|
|
23
29
|
expect(rep.find( (n:any) => n.name==="delay").nWorkers).to.eq(3)
|
|
24
30
|
|
package/src/worker.ts
CHANGED
|
@@ -173,7 +173,6 @@ export class Worker {
|
|
|
173
173
|
|
|
174
174
|
let opts = serialize.unpack(optBuff) as Partial<EbusRequestOptions>
|
|
175
175
|
log.debug(`worker for ${this.service} received request ${type} with opts`, opts)
|
|
176
|
-
|
|
177
176
|
let timeout = opts.receiveTimeout || this.configuration.receiveTimeout
|
|
178
177
|
let responseMessageType: Message.Reply | Message.Reject | Message.Timeout | Message.Error = Message.Reply
|
|
179
178
|
|