Skip to content

Commit

Permalink
fix(jobs): [nan-1010] use void (#2195)
Browse files Browse the repository at this point in the history
## Describe your changes
As explained by Thomas:

![image](https://github.com/NangoHQ/nango/assets/1724137/49464765-394f-4bdc-8c15-388f72704980)

Use void since we're not explicitly handling the promise resolution of
the webhook sending

Tested this against returning a 504 (what the customer is returning from
their webhook) from a webhook with Temporal and the task execution
completes even as the webhook continues to retry. With `async` usage,
the temporal activity is still in running state while the webhook
retries.

## Issue ticket number and link

## Checklist before requesting a review (skip if just adding/editing
APIs & templates)
- [ ] I added tests, otherwise the reason is: 
- [ ] I added observability, otherwise the reason is:
- [ ] I added analytics, otherwise the reason is:
  • Loading branch information
khaliqgant authored May 23, 2024
1 parent e3a4cb7 commit a1c5d3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { stringifyError } from '@nangohq/utils';

dayjs.extend(utc);

const RETRY_ATTEMPTS = 10;
const RETRY_ATTEMPTS = 7;

const NON_FORWARDABLE_HEADERS = [
'host',
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/lib/services/sync/run.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ export default class SyncRun {
deleted
};

await webhookService.sendSyncUpdate(
void webhookService.sendSyncUpdate(
this.nangoConnection,
this.syncName,
model,
Expand Down

0 comments on commit a1c5d3a

Please sign in to comment.