Don't display error messages when second scheduled rc command fails
This commit is contained in:
parent
d91a7cbf97
commit
38a8a57a90
1 changed files with 5 additions and 5 deletions
|
@ -241,15 +241,15 @@ $(document).ready(function () {
|
||||||
const noteQuery = new URLSearchParams({ url: osmHost + OSM.apiUrl(object) });
|
const noteQuery = new URLSearchParams({ url: osmHost + OSM.apiUrl(object) });
|
||||||
sendRemoteEditCommand(remoteEditHost + "/import?" + noteQuery);
|
sendRemoteEditCommand(remoteEditHost + "/import?" + noteQuery);
|
||||||
}
|
}
|
||||||
});
|
}, function () {
|
||||||
|
|
||||||
function sendRemoteEditCommand(url, callback) {
|
|
||||||
fetch(url, { mode: "no-cors", signal: AbortSignal.timeout(5000) })
|
|
||||||
.then(callback)
|
|
||||||
.catch(function () {
|
|
||||||
// eslint-disable-next-line no-alert
|
// eslint-disable-next-line no-alert
|
||||||
alert(I18n.t("site.index.remote_failed"));
|
alert(I18n.t("site.index.remote_failed"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function sendRemoteEditCommand(url, callback, errorCallback) {
|
||||||
|
fetch(url, { mode: "no-cors", signal: AbortSignal.timeout(5000) })
|
||||||
|
.then(callback)
|
||||||
|
.catch(errorCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue