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

Get Queue Name for Logging #140

Closed
bobdercole opened this issue Feb 13, 2020 · 2 comments · Fixed by #141
Closed

Get Queue Name for Logging #140

bobdercole opened this issue Feb 13, 2020 · 2 comments · Fixed by #141
Labels

Comments

@bobdercole
Copy link
Contributor

Hi,

I like to use queue events for logging. I find it useful to log the queue name with each event.

In Bull v3 we had access to the queue name. However, it was marked protected in v4.

constructor(protected name: string, public opts: QueueBaseOptions = {}) {

At the moment I am working around the issue by calling toKey with an empty string, since toKey happens to contain the queue name.

Would you consider making the queue name publicly readable? Or perhaps there is another way to get the name that I'm overlooking?

Thanks!

@manast
Copy link
Contributor

manast commented Feb 13, 2020

yes, actually I think public is better considering there is no getter for the queue name, no reason to make that property protected/private.

bobdercole added a commit to bobdercole/bullmq that referenced this issue Feb 14, 2020
manast added a commit that referenced this issue Mar 2, 2020
feat: made queue name publicly readable for #140
manast pushed a commit that referenced this issue Mar 2, 2020
### Features

* made queue name publicly readable for [#140](#140) ([f2bba2e](f2bba2e))
@manast
Copy link
Contributor

manast commented Mar 2, 2020

🎉 This issue has been resolved in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@manast manast added the released label Mar 2, 2020
manast added a commit that referenced this issue Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants