Skip to content

Commit

Permalink
Cap update (NangoHQ#2107)
Browse files Browse the repository at this point in the history
## Describe your changes
Remove capping which seems to not behave as expected and add logging
## 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 6, 2024
1 parent 05a079c commit 4af1507
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/server/lib/controllers/flow.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ class FlowController {
return;
}

console.log(account);
if (account.is_capped && flow?.providerConfigKey) {
const isCapped = await connectionService.shouldCapUsage({ providerConfigKey: flow?.providerConfigKey, environmentId: environment.id });

Expand Down
5 changes: 3 additions & 2 deletions packages/shared/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { isEnterprise } from '@nangohq/utils';
//import { isEnterprise } from '@nangohq/utils';

export const SYNC_TASK_QUEUE = 'nango-syncs';
export const WEBHOOK_TASK_QUEUE = 'nango-webhooks';
export const CONNECTIONS_WITH_SCRIPTS_CAP_LIMIT = isEnterprise ? Infinity : 3;
//export const CONNECTIONS_WITH_SCRIPTS_CAP_LIMIT = isEnterprise ? Infinity : 3;
export const CONNECTIONS_WITH_SCRIPTS_CAP_LIMIT = Infinity;

0 comments on commit 4af1507

Please sign in to comment.