-
Notifications
You must be signed in to change notification settings - Fork 4
add rate limit handling to trigger and action execution #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -150,6 +150,13 @@ async function processTrigger(msg, cfg, snapshot, incomingMessageHeaders, tokenD | |||||
| do { | ||||||
| const { body, headers } = await executeCall.call(this, callParams); | ||||||
|
|
||||||
| // Wait for rate limit if specified | ||||||
|
||||||
| const rateLimit = cfg.nodeSettings && cfg.nodeSettings.rateLimit ? parseInt(cfg.nodeSettings.rateLimit) : 1700; | ||||||
|
||||||
| const rateLimit = cfg.nodeSettings && cfg.nodeSettings.rateLimit ? parseInt(cfg.nodeSettings.rateLimit) : 1700; | |
| const rateLimit = cfg.nodeSettings && cfg.nodeSettings.rateLimit ? parseInt(cfg.nodeSettings.rateLimit, 10) : 1700; |
Copilot
AI
Jul 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Rate-limit logs can be verbose at info level; consider using debug or a lower verbosity level to prevent log noise in production.
| this.logger.info(`Waiting for rate limit: ${rateLimit} ms`); | |
| this.logger.debug(`Waiting for rate limit: ${rateLimit} ms`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a radix parameter to parseInt (e.g., parseInt(cfg.nodeSettings.rateLimit, 10)) for consistent parsing across environments.