Skip to content

Commit

Permalink
Merge branch 'main' of github.com:pgflow-dev/pgflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jumski committed Jan 22, 2025
2 parents b3b98ba + 0b6b3e3 commit 254ec63
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ You can pass an optional configuration object as the second argument to `EdgeWor
to tweak the worker's behavior.

<Aside title="Zero configuration needed" type="tip">
All configuration options are optional and have sane defaults.
All configuration options are optional and have good defaults.

You only need to provide the handler function:

```ts
EdgeWorker.start(console.log);
```
</Aside>

### Default configuration
Expand Down

0 comments on commit 254ec63

Please sign in to comment.