bbc / sqs-consumer

Build Amazon Simple Queue Service (SQS) based applications without the boilerplate
https://bbc.github.io/sqs-consumer/
Other
1.71k stars 330 forks source link

fix: timeout ids are not being set correctly for parallel running #380

Closed nicholasgriffintn closed 1 year ago

nicholasgriffintn commented 1 year ago

Resolves #376

Description:

As described in the issue.

Type of change:

Why is this change required?:

heartbeatTimeoutId was previously set globally, rather than within the processor function, which means that it errors when the Consumer is processing messages in parallel.

Code changes:

nicholasgriffintn commented 1 year ago

This could do with some sort of e2e test for running in parallel so it doesn't occur again. But as this is reverting a change to how it originally worked, I think this can be merged without that for now.

codeclimate[bot] commented 1 year ago

Code Climate has analyzed commit 879150f0 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (80% is the threshold).

This pull request will bring the total coverage in the repository to 94.4% (0.0% change).

View more on Code Climate.