-
Notifications
You must be signed in to change notification settings - Fork 28
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
Easy way to disable batcher for development and testing #13
Comments
This seems sensible although I would have thought setting maxBatchedRequestPerCall to 0 would have done the trick. Let me investigate. Jon |
Me too, but it doesn't instead it batches each request into a single one to /batch |
Whops sorry, that close and comment button is way to easy to hit. |
This was becoming more and more of an issue as we troubhshoot things so I mucked around in your code and did the following: this.canBatchCall = function (url, method) {
var config = this.getBatchConfig(url);
return config !== undefined &&
config.batchEndpointUrl !== url &&
config.ignoredVerbs.indexOf(method.toLowerCase()) === -1 &&
config.maxBatchedRequestPerCall > 0;
}; See the last line. If maxBatchedRequestPerCall is zero, it will now not batch the any requests. |
This seems a reasonable approach. Sorry I have been so busy lately at work and outside. Things are starting to settle down from next week so I will be able to tackle these issues. |
The config option now has an enabled flag. Set to false to disable.
|
I've ran into a case where the batcher is breaking our login checking system. As part of troubleshooting this I wanted to shut off the batcher but can't find an easy of doing so (without commenting out the main js file, the config js file and the line where we inject it into the app, which is kind of painful.
Is there a way to do this in the config? I tried setting maxBatchedRequestPerCall to 1 but that didn't do it.
If not, can we get a config option that would completely turn off batching for testing?
The text was updated successfully, but these errors were encountered: