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') {
|
||||
await deleteFromElastic(claim.claimId);
|
||||
deleteFromElastic(claim.claimId);
|
||||
} else {
|
||||
await pushElastic(claim);
|
||||
pushElastic(claim);
|
||||
}
|
||||
lastID = claim.id;
|
||||
}
|
||||
|
@ -126,26 +126,22 @@ async function deleteBlockedClaims () {
|
|||
winston.log('info', '[Importer] Done processing blocked claims!');
|
||||
}
|
||||
|
||||
async function deleteFromElastic (claimid) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
function deleteFromElastic (claimid) {
|
||||
queue.push({
|
||||
index: 'claims',
|
||||
type : 'claim',
|
||||
id : claimid,
|
||||
body : {},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function pushElastic (claim) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
function pushElastic (claim) {
|
||||
queue.push({
|
||||
index: 'claims',
|
||||
type : 'claim',
|
||||
id : claim.claimId,
|
||||
body : claim,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getJSON (path) {
|
||||
|
|
Loading…
Reference in a new issue