-
Notifications
You must be signed in to change notification settings - Fork 14
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
#17 Modified reclaim to run on original engine with tests #21
#17 Modified reclaim to run on original engine with tests #21
Conversation
@@ -276,7 +276,7 @@ Queue.prototype._checkReclaim = function() { | |||
|
|||
function findOtherQueues(name) { | |||
var res = []; | |||
var storage = self._store.engine; | |||
var storage = self._store.getOriginalEngine(); |
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.
question: One of the scenarios that triggers a switch to the in memory engine is a failure to getItem
from localStorage, for example if a user has blocked localStorage access to a particular domain.
In this scenario how do we handle failures to get the reclaim and ack etc?
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.
getItem
just returns null
if there is an error (ref). The check to see if we can get items from localStorage happens inside of the engine (ref).
This means that if the user has blocked localStorage, the initial defaultEngine
will be inMemory. This will mean that this code path will work as expected.
No idea why this is failing in CI :( |
@Dahaden will try to get this reviewed. Also don't worry about the CI, the configuration is outdated and need some attention on our side. |
@Dahaden just checked this out locally and LGTM! We can merge this and I'll cut a new release. We're also aware CircleCI is busted (this library is using 1.0!) as FYI |
Thank you very much @bryanmikaelian ! This is amazing! |
This PR aims at fixing issue #17 by allowing the reclaim mechanism to run on the original engine and not the inmemory engine