|
|
@ -102,10 +102,6 @@ module.exports = function(state) {
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
debug(`Task '${task.name}:${id}' locked successfully`);
|
|
|
|
debug(`Task '${task.name}:${id}' locked successfully`);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}).catch({ name: "UniqueViolationError" }, () => {
|
|
|
|
|
|
|
|
// FIXME: This is not the correct error...
|
|
|
|
|
|
|
|
debug(`Task '${task.name}:${id}' failed lock because already locked on write`);
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
debug(`Task '${task.name}:${id}' failed lock because already locked on read`);
|
|
|
|
debug(`Task '${task.name}:${id}' failed lock because already locked on read`);
|
|
|
|