Skip to content

Conversation

@lukiano
Copy link

@lukiano lukiano commented Jul 3, 2025

Why

I noticed that if await this._client throws, the outer Promise doesn't get rejected, nor resolved.

How

As it isn't possible to make a get async, the change creates an async anonymous function and immediately executes it.

Additional Notes (Optional)

In the future, we could consider not using a getter but a regular function. Additionally, the logic is duplicated in both Queue and Worker.

Copy link
Contributor

@manast manast left a comment

Choose a reason for hiding this comment

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

It would be useful to have a test that confirms the error you are resolving. Also, I noticed the code is duplicated, maybe it could be moved to QueueBase instead to avoid the duplication.

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