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:
Sebastian 2022-10-21 11:08:10 -03:00
parent 5da924a760
commit 5ba7956f49
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1

View File

@ -891,12 +891,18 @@ async function unblockBackup(
await tx.backupProviders.indexes.byPaymentProposalId await tx.backupProviders.indexes.byPaymentProposalId
.iter(proposalId) .iter(proposalId)
.forEachAsync(async (bp) => { .forEachAsync(async (bp) => {
if (bp.state.tag === BackupProviderStateTag.Retrying) { // if (bp.state.tag === BackupProviderStateTag.Retrying) {
bp.state = { bp.state = {
tag: BackupProviderStateTag.Ready, tag: BackupProviderStateTag.Ready,
nextBackupTimestamp: TalerProtocolTimestamp.now(), nextBackupTimestamp: AbsoluteTime.toTimestamp(
AbsoluteTime.addDuration(
AbsoluteTime.now(),
Duration.fromSpec({ days: 7 }),
),
),
}; };
} // }
tx.backupProviders.put(bp);
}); });
}); });
} }