Skip to content

Commit

Permalink
refactor(types): update import statements to use type keyword
Browse files Browse the repository at this point in the history
Add debug logging for MessageExecutor abort event
  • Loading branch information
jumski committed Jan 22, 2025
1 parent 3529aa4 commit 0b6b3e3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkgs/edge-worker/src/MessageExecutor.ts
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down Expand Up @@ -45,6 +45,9 @@ export class MessageExecutor<MessagePayload extends Json> {
this.signal.addEventListener(
'abort',
() => {
console.log(
`################ MessageExecutor aborted during execution: ${this.msgId} ##`
);
reject(new AbortError());
},
{ once: true }
Expand Down

0 comments on commit 0b6b3e3

Please sign in to comment.