-
Notifications
You must be signed in to change notification settings - Fork 816
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
Add size() to expose amount of requests in queue #2941
Conversation
Thanks for submitting this! We have a lot of (Regarding running the |
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.
I'd like @tropicadri to get a chance to review this, as she's touched the IndexedDB code most recently, but generally speaking, this looks like it would be useful as implemented.
Note that expired entries (per `maxRetentionTime`) are also included in this count Closes GoogleChrome#2940
19b1da9
to
67205ae
Compare
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.
LGTM Thank you!
I checked it out, I agree with you :) |
R: @jeffposnick @tropicadri
Fixes #2940
In short, this allows a developer to perform a quick count of what's left in the queue, so that a number could be displayed in a status indicator... or whatever else the developer wants to do with the number.
It's not as heavy as
(await queue.getAll()).length
and doesn't modify the queueWell, I tried... but Windows doesn't very much like the npm scripts and as such I had to bypass the git hooks as well, it just wouldn't run.. Hopefully I managed to keep everything consistent with the surrounding code :-)