remove unused promises
This commit is contained in:
parent
7bdf527ec9
commit
9934258046
1 changed files with 14 additions and 18 deletions
|
@ -80,9 +80,9 @@ export async function claimSync () {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (claim.bid_state === 'Spent' || claim.bid_state === 'Expired') {
|
if (claim.bid_state === 'Spent' || claim.bid_state === 'Expired') {
|
||||||
await deleteFromElastic(claim.claimId);
|
deleteFromElastic(claim.claimId);
|
||||||
} else {
|
} else {
|
||||||
await pushElastic(claim);
|
pushElastic(claim);
|
||||||
}
|
}
|
||||||
lastID = claim.id;
|
lastID = claim.id;
|
||||||
}
|
}
|
||||||
|
@ -126,26 +126,22 @@ async function deleteBlockedClaims () {
|
||||||
winston.log('info', '[Importer] Done processing blocked claims!');
|
winston.log('info', '[Importer] Done processing blocked claims!');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteFromElastic (claimid) {
|
function deleteFromElastic (claimid) {
|
||||||
return new Promise(async (resolve, reject) => {
|
|
||||||
queue.push({
|
queue.push({
|
||||||
index: 'claims',
|
index: 'claims',
|
||||||
type : 'claim',
|
type : 'claim',
|
||||||
id : claimid,
|
id : claimid,
|
||||||
body : {},
|
body : {},
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function pushElastic (claim) {
|
function pushElastic (claim) {
|
||||||
return new Promise(async (resolve, reject) => {
|
|
||||||
queue.push({
|
queue.push({
|
||||||
index: 'claims',
|
index: 'claims',
|
||||||
type : 'claim',
|
type : 'claim',
|
||||||
id : claim.claimId,
|
id : claim.claimId,
|
||||||
body : claim,
|
body : claim,
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getJSON (path) {
|
function getJSON (path) {
|
||||||
|
|
Loading…
Reference in a new issue