Skip to content

Commit

Permalink
pass pollInterval to paranaoidChecking of pg-listen
Browse files Browse the repository at this point in the history
  • Loading branch information
darky committed Oct 15, 2024
1 parent b2650f8 commit cf4f7f4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ export class Notifier implements StartStop {

constructor(options: Options, private fsm: FSM) {
import('pg-listen').then(({ default: createSubscriber }) => {
this.notifier = createSubscriber({
application_name: 'pg_trx_outbox_pubsub',
...options.pgOptions,
})
this.notifier = createSubscriber(
{
application_name: 'pg_trx_outbox_pubsub',
...options.pgOptions,
},
{ paranoidChecking: options.outboxOptions?.pollInterval ?? 30_000 }
)
this.notifier.events.on('error', err => options.outboxOptions?.onError?.(err))
})
}
Expand Down

0 comments on commit cf4f7f4

Please sign in to comment.