wallet-core/packages/taler-wallet-core/src/util/retries.ts

53 lines
1.5 KiB
TypeScript
Raw Normal View History

2020-09-08 17:00:03 +02:00
/*
This file is part of GNU Taler
(C) 2020 Taler Systems S.A.
GNU Taler is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* Helpers for dealing with retry timeouts.
*/
/**
* Imports.
*/
2022-09-05 18:12:30 +02:00
import {
AbsoluteTime,
Duration,
Logger,
2022-09-05 18:12:30 +02:00
TalerErrorDetail,
} from "@gnu-taler/taler-util";
import {
BackupProviderRecord,
DepositGroupRecord,
ExchangeRecord,
2023-02-19 23:13:44 +01:00
PeerPullPaymentIncomingRecord,
PeerPullPaymentInitiationRecord,
PeerPushPaymentIncomingRecord,
PeerPushPaymentInitiationRecord,
2022-09-05 18:12:30 +02:00
PurchaseRecord,
RecoupGroupRecord,
RefreshGroupRecord,
TipRecord,
WalletStoresV1,
WithdrawalGroupRecord,
} from "../db.js";
2023-02-15 23:32:42 +01:00
import { TalerError } from "@gnu-taler/taler-util";
2022-09-05 18:12:30 +02:00
import { InternalWalletState } from "../internal-wallet-state.js";
import { PendingTaskType, TaskId } from "../pending-types.js";
2022-09-05 18:12:30 +02:00
import { GetReadWriteAccess } from "./query.js";
import { assertUnreachable } from "./assertUnreachable.js";
2020-09-08 17:00:03 +02:00
const logger = new Logger("util/retries.ts");