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
|
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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user