unlockBackup was not unlocking: not updating when backup state is ready also nextBackupTimestap = now tries to backup in a loop
This commit is contained in:
parent
5da924a760
commit
5ba7956f49
@ -891,12 +891,18 @@ async function unblockBackup(
|
||||
await tx.backupProviders.indexes.byPaymentProposalId
|
||||
.iter(proposalId)
|
||||
.forEachAsync(async (bp) => {
|
||||
if (bp.state.tag === BackupProviderStateTag.Retrying) {
|
||||
bp.state = {
|
||||
tag: BackupProviderStateTag.Ready,
|
||||
nextBackupTimestamp: TalerProtocolTimestamp.now(),
|
||||
};
|
||||
}
|
||||
// if (bp.state.tag === BackupProviderStateTag.Retrying) {
|
||||
bp.state = {
|
||||
tag: BackupProviderStateTag.Ready,
|
||||
nextBackupTimestamp: AbsoluteTime.toTimestamp(
|
||||
AbsoluteTime.addDuration(
|
||||
AbsoluteTime.now(),
|
||||
Duration.fromSpec({ days: 7 }),
|
||||
),
|
||||
),
|
||||
};
|
||||
// }
|
||||
tx.backupProviders.put(bp);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user