Skip to content
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

fix: use batches for queue #311

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

fenos
Copy link
Contributor

@fenos fenos commented Apr 13, 2023

What kind of change does this PR introduce?

Feature

What is the new behavior?

Use batches when for webhook queue

@github-actions
Copy link

Pull Request Test Coverage Report for Build 4689058586

  • 27 of 91 (29.67%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 84.046%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/queue/events/webhook.ts 5 6 83.33%
src/queue/events/base-event.ts 20 30 66.67%
src/queue/queue.ts 0 53 0.0%
Totals Coverage Status
Change from base Build 4677908795: -0.1%
Covered Lines: 7057
Relevant Lines: 8336

💛 - Coveralls

@fenos fenos force-pushed the queue/use-batches-for-webhook branch from 129938e to 2b10ce3 Compare April 13, 2023 12:18
const { webhookURL, webhookApiKey, webhookQueuePullInterval } = getConfig()
const { webhookURL, webhookApiKey, webhookQueuePullInterval, webhookQueueBatchSize } = getConfig()

const httpClient = rateLimit(axios.create(), { maxRPS: 100 })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably make this an env var

@@ -46,6 +46,20 @@ export abstract class BaseEvent<T extends Omit<BasePayload, '$version'>> {
return {}
}

static ack(job: Job<BaseEvent<any>['payload']> | Job<BaseEvent<any>['payload']>[]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

complete is a better word for this?

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.

2 participants