Remove JSON column and Backbone Model for unprocessed
This commit is contained in:
parent
9c540ab977
commit
041fe4be05
6 changed files with 164 additions and 56 deletions
|
@ -131,6 +131,8 @@ module.exports = {
|
|||
getUnprocessedById,
|
||||
saveUnprocessed,
|
||||
saveUnprocesseds,
|
||||
updateUnprocessedAttempts,
|
||||
updateUnprocessedWithData,
|
||||
removeUnprocessed,
|
||||
removeAllUnprocessed,
|
||||
|
||||
|
@ -848,13 +850,8 @@ async function getAllUnprocessed() {
|
|||
return channels.getAllUnprocessed();
|
||||
}
|
||||
|
||||
async function getUnprocessedById(id, { Unprocessed }) {
|
||||
const unprocessed = await channels.getUnprocessedById(id);
|
||||
if (!unprocessed) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Unprocessed(unprocessed);
|
||||
async function getUnprocessedById(id) {
|
||||
return channels.getUnprocessedById(id);
|
||||
}
|
||||
|
||||
async function saveUnprocessed(data, { forceSave } = {}) {
|
||||
|
@ -868,6 +865,13 @@ async function saveUnprocesseds(arrayOfUnprocessed, { forceSave } = {}) {
|
|||
});
|
||||
}
|
||||
|
||||
async function updateUnprocessedAttempts(id, attempts) {
|
||||
await channels.updateUnprocessedAttempts(id, attempts);
|
||||
}
|
||||
async function updateUnprocessedWithData(id, data) {
|
||||
await channels.updateUnprocessedWithData(id, data);
|
||||
}
|
||||
|
||||
async function removeUnprocessed(id) {
|
||||
await channels.removeUnprocessed(id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue