task 584: Add a timeout of 10 seconds for reconciliation service to respond
http://code.google.com/p/google-refine/issues/detail?id=584 git-svn-id: http://google-refine.googlecode.com/svn/trunk@2580 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
3ff52ba494
commit
12308c2840
@ -75,12 +75,15 @@ ReconciliationManager.registerService = function(service) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ReconciliationManager.registerStandardService = function(url, f) {
|
ReconciliationManager.registerStandardService = function(url, f) {
|
||||||
var dismissBusy = DialogSystem.showBusy();
|
var dismissBusy = DialogSystem.showBusy("Contacting reconciliation service...");
|
||||||
|
|
||||||
$.getJSON(
|
$.ajax(
|
||||||
url + (url.contains("?") ? "&" : "?") + "callback=?",
|
url,
|
||||||
null,
|
{ "dataType" : "jsonp",
|
||||||
function(data) {
|
"timeout":10000
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.success(function(data, textStatus, jqXHR) {
|
||||||
data.url = url;
|
data.url = url;
|
||||||
data.ui = { "handler" : "ReconStandardServicePanel" };
|
data.ui = { "handler" : "ReconStandardServicePanel" };
|
||||||
|
|
||||||
@ -97,12 +100,10 @@ ReconciliationManager.registerStandardService = function(url, f) {
|
|||||||
if (f) {
|
if (f) {
|
||||||
f(index);
|
f(index);
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
"jsonp"
|
|
||||||
)
|
|
||||||
.error(function(jqXHR, textStatus, errorThrown) {
|
.error(function(jqXHR, textStatus, errorThrown) {
|
||||||
dismissBusy();
|
dismissBusy();
|
||||||
alert('Error contacting recon service: '+textStatus + ' : ' + errorThrown);
|
alert('Error contacting recon service: ' + textStatus + ' : ' + errorThrown + ' - ' + url);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user