Skip to content

Fix: resolve webhook retry processor conflict and share retry config (#8)#28

Open
Sam-Rytech wants to merge 1 commit into
LabsCrypt:mainfrom
Sam-Rytech:fix-webhook-retry
Open

Fix: resolve webhook retry processor conflict and share retry config (#8)#28
Sam-Rytech wants to merge 1 commit into
LabsCrypt:mainfrom
Sam-Rytech:fix-webhook-retry

Conversation

@Sam-Rytech

Copy link
Copy Markdown
Contributor

Description

This PR resolves the conflicting retry implementations between webhookRetryScheduler and webhookService.

Changes Made

  • Picked webhookRetryProcessor.ts as the single surviving implementation and wired it into index.ts.
  • Deleted the conflicting webhookRetryScheduler.ts to remove duplicate sources of truth.
  • Extracted backoff configurations and max attempts into a single shared WEBHOOK_RETRY_CONFIG used by webhookService.ts.
  • Updated webhook retry SQL queries to properly alias columns (wd.id, ws.callback_url, etc.), avoiding ambiguous references and mapping correctly to the current schema.
  • Added a test in webhookRetryProcessor.test.ts asserting that the processor respects the configured backoff delays and max attempts.

Closes #8

- Removed webhookRetryScheduler.ts as its logic conflicts with webhookService.ts
- Extracted backoff config and max attempts into a shared config WEBHOOK_RETRY_CONFIG
- Updated WebhookService.processRetries query to properly alias columns to avoid ambiguous references and to utilize the new config
- Updated index.ts to wire up the surviving webhookRetryProcessor
- Added test verifying retry processor respects backoff delays and max attempts

Closes #123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] Two webhook retry implementations diverge and one is wired up, the other is dead

1 participant