Increment unprocessed attempts when fetching
This commit is contained in:
parent
6d576ed901
commit
d6b58d23d6
6 changed files with 77 additions and 41 deletions
|
@ -802,17 +802,11 @@ export default class MessageReceiver
|
|||
return [];
|
||||
}
|
||||
|
||||
const items = await this.storage.protocol.getAllUnprocessed();
|
||||
const items =
|
||||
await this.storage.protocol.getAllUnprocessedAndIncrementAttempts();
|
||||
log.info('getAllFromCache loaded', items.length, 'saved envelopes');
|
||||
|
||||
return items.map(item => {
|
||||
const { attempts = 0 } = item;
|
||||
|
||||
return {
|
||||
...item,
|
||||
attempts: attempts + 1,
|
||||
};
|
||||
});
|
||||
return items;
|
||||
}
|
||||
|
||||
private async decryptAndCacheBatch(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue