From 0b6b3e3825754e18906220f6c0531d1fa4d2354e Mon Sep 17 00:00:00 2001 From: Wojtek Majewski Date: Wed, 22 Jan 2025 07:27:01 +0100 Subject: [PATCH] refactor(types): update import statements to use type keyword Add debug logging for MessageExecutor abort event --- pkgs/edge-worker/src/MessageExecutor.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/edge-worker/src/MessageExecutor.ts b/pkgs/edge-worker/src/MessageExecutor.ts index feb46b2..7effda8 100644 --- a/pkgs/edge-worker/src/MessageExecutor.ts +++ b/pkgs/edge-worker/src/MessageExecutor.ts @@ -1,7 +1,7 @@ -import { Json } from './types.ts'; -import { type MessageRecord } from './types.ts'; -import { Queue } from './Queue.ts'; -import { BatchArchiver } from './BatchArchiver.ts'; +import type { Json } from './types.ts'; +import type { MessageRecord } from './types.ts'; +import type { Queue } from './Queue.ts'; +import type { BatchArchiver } from './BatchArchiver.ts'; class AbortError extends Error { constructor() { @@ -45,6 +45,9 @@ export class MessageExecutor { this.signal.addEventListener( 'abort', () => { + console.log( + `################ MessageExecutor aborted during execution: ${this.msgId} ##` + ); reject(new AbortError()); }, { once: true }