Remove fallback changes

This commit is contained in:
cgonzalez 2021-03-22 14:52:16 +00:00
parent 41541c2ffd
commit bfe2e5b76b

View File

@ -30,11 +30,7 @@ MainFallback.prototype.getNextQuery = function (job) {
MainFallback.prototype.getOnSuccess = function (job) {
if (job.status === jobStatus.DONE && job.fallback_status === jobStatus.PENDING) {
var onsuccessQuery = job.query.onsuccess;
if (onsuccessQuery) {
onsuccessQuery = onsuccessQuery.replace(/<%=\s*job_id\s*%>/g, job.job_id);
}
return onsuccessQuery;
return job.query.onsuccess;
}
};
@ -44,12 +40,7 @@ MainFallback.prototype.hasOnSuccess = function (job) {
MainFallback.prototype.getOnError = function (job) {
if (job.status === jobStatus.FAILED && job.fallback_status === jobStatus.PENDING) {
var onerrorQuery = job.query.onerror;
if (onerrorQuery) {
onerrorQuery = onerrorQuery.replace(/<%=\s*job_id\s*%>/g, job.job_id);
onerrorQuery = onerrorQuery.replace(/<%=\s*error_message\s*%>/g, job.failed_reason);
}
return onerrorQuery;
return job.query.onerror;
}
};