Prevented removal of a job which did not finish due to an exception
This commit is contained in:
parent
caffb014d3
commit
8e1466e511
1 changed files with 2 additions and 2 deletions
|
@ -125,7 +125,7 @@ Admin.dequeue = function() {
|
||||||
let job = new Admin.Job(jobs[i]);
|
let job = new Admin.Job(jobs[i]);
|
||||||
if (job.target) {
|
if (job.target) {
|
||||||
try {
|
try {
|
||||||
app.log('PROCESSING QUEUED JOB ' + (i+1) + ' OF ' + max);
|
app.log('Processing queued job ' + (i + 1) + ' of ' + max);
|
||||||
switch (job.method) {
|
switch (job.method) {
|
||||||
case 'remove':
|
case 'remove':
|
||||||
Site.remove.call(job.target);
|
Site.remove.call(job.target);
|
||||||
|
@ -137,12 +137,12 @@ Admin.dequeue = function() {
|
||||||
Exporter.run(job.target, job.user);
|
Exporter.run(job.target, job.user);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
job.remove();
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
app.log('Failed to process job ' + job + ' due to ' + ex);
|
app.log('Failed to process job ' + job + ' due to ' + ex);
|
||||||
app.debug(ex.rhinoException);
|
app.debug(ex.rhinoException);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
job.remove();
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue