@pgflow/edge-worker 0.0.10-prealpha.5 → 0.0.10-prealpha.6
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/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DenoAdapter.d.ts","sourceRoot":"","sources":["../../src/platform/DenoAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,MAAM,EACN,eAAe,EACf,mBAAmB,EACpB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"DenoAdapter.d.ts","sourceRoot":"","sources":["../../src/platform/DenoAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,MAAM,EACN,eAAe,EACf,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,iBAAiB,CAAC;AAEzB;;GAEG;AACH,qBAAa,WAAY,YAAW,eAAe;IACjD,OAAO,CAAC,GAAG,CAAsB;IACjC,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,MAAM,CAAuB;;IAe/B,UAAU,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA4BzD,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAMhC,MAAM,IAAI,mBAAmB;IAI7B,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IA6C9B,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA+B/D,OAAO,CAAC,iBAAiB;IAsBzB,OAAO,CAAC,mBAAmB;IAI3B,oBAAoB,IAAI,IAAI;CAW7B"}
|
|
@@ -25,6 +25,10 @@ export class DenoAdapter {
|
|
|
25
25
|
logger.info(`HTTP Request: ${this.edgeFunctionName}`);
|
|
26
26
|
// Create the worker using the factory function and the logger
|
|
27
27
|
this.worker = createWorkerFn(this.createLogger.bind(this));
|
|
28
|
+
this.worker.startOnlyOnce({
|
|
29
|
+
edgeFunctionName: this.edgeFunctionName,
|
|
30
|
+
workerId: this.env.executionId,
|
|
31
|
+
});
|
|
28
32
|
}
|
|
29
33
|
return new Response('ok', {
|
|
30
34
|
headers: { 'Content-Type': 'application/json' },
|
|
@@ -36,8 +40,7 @@ export class DenoAdapter {
|
|
|
36
40
|
}
|
|
37
41
|
async terminate() {
|
|
38
42
|
if (this.worker) {
|
|
39
|
-
this.worker.stop();
|
|
40
|
-
this.worker = null;
|
|
43
|
+
await this.worker.stop();
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
getEnv() {
|