gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: wallet-core: get rid of max r


From: gnunet
Subject: [taler-wallet-core] branch master updated: wallet-core: get rid of max retries in task loop
Date: Tue, 13 Feb 2024 10:58:10 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 8677830b0 wallet-core: get rid of max retries in task loop
8677830b0 is described below

commit 8677830b02d8d098cb94752d894903cc476b6703
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Feb 13 10:58:11 2024 +0100

    wallet-core: get rid of max retries in task loop
    
    It's not used anywhere.
---
 packages/taler-harness/src/harness/harness.ts |  8 +++-----
 packages/taler-wallet-cli/src/index.ts        | 10 +---------
 packages/taler-wallet-core/src/wallet.ts      | 19 -------------------
 3 files changed, 4 insertions(+), 33 deletions(-)

diff --git a/packages/taler-harness/src/harness/harness.ts 
b/packages/taler-harness/src/harness/harness.ts
index b9164a968..48f8450fd 100644
--- a/packages/taler-harness/src/harness/harness.ts
+++ b/packages/taler-harness/src/harness/harness.ts
@@ -26,9 +26,9 @@
  */
 import {
   AccountAddDetails,
+  AccountRestriction,
   AmountJson,
   Amounts,
-  TalerCorebankApiClient,
   Configuration,
   CoreApiResponse,
   Duration,
@@ -36,6 +36,7 @@ import {
   Logger,
   MerchantInstanceConfig,
   PartialMerchantInstanceConfig,
+  TalerCorebankApiClient,
   TalerError,
   WalletNotification,
   createEddsaKeyPair,
@@ -45,7 +46,6 @@ import {
   j2s,
   parsePaytoUri,
   stringToBytes,
-  AccountRestriction,
 } from "@gnu-taler/taler-util";
 import {
   HttpRequestLibrary,
@@ -73,7 +73,6 @@ import * as http from "http";
 import * as net from "node:net";
 import * as path from "path";
 import * as readline from "readline";
-import { URL } from "url";
 import { CoinConfig } from "./denomStructures.js";
 
 const logger = new Logger("harness.ts");
@@ -2131,7 +2130,7 @@ export class WalletCli {
     return this._client;
   }
 
-  async runUntilDone(args: { maxRetries?: number } = {}): Promise<void> {
+  async runUntilDone(args: {} = {}): Promise<void> {
     await runCommand(
       this.globalTestState,
       `wallet-${this.name}`,
@@ -2144,7 +2143,6 @@ export class WalletCli {
         "--wallet-db",
         this.dbfile,
         "run-until-done",
-        ...(args.maxRetries ? ["--max-retries", `${args.maxRetries}`] : []),
       ],
     );
   }
diff --git a/packages/taler-wallet-cli/src/index.ts 
b/packages/taler-wallet-cli/src/index.ts
index 900649c61..91dcd2702 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -34,7 +34,6 @@ import {
   parsePaytoUri,
   parseTalerUri,
   PreparePayResultType,
-  RecoveryMergeStrategy,
   sampleWalletCoreTransactions,
   setDangerousTimetravel,
   setGlobalLogLevelFromString,
@@ -56,7 +55,6 @@ import { createPlatformHttpLib } from 
"@gnu-taler/taler-util/http";
 import { JsonMessage, runRpcServer } from "@gnu-taler/taler-util/twrpc";
 import {
   AccessStats,
-  createNativeWalletHost,
   createNativeWalletHost2,
   Wallet,
   WalletApiOperation,
@@ -554,19 +552,13 @@ walletCli
   .subcommand("finishPendingOpt", "run-until-done", {
     help: "Run until no more work is left.",
   })
-  .maybeOption("maxRetries", ["--max-retries"], clk.INT)
-  .flag("failOnMaxRetries", ["--fail-on-max-retries"])
   .action(async (args) => {
     await withLocalWallet(args, async (wallet) => {
       logger.info("running until pending operations are finished");
-      const resp = await wallet.ws.runTaskLoop({
-        maxRetries: args.finishPendingOpt.maxRetries,
+      await wallet.ws.runTaskLoop({
         stopWhenDone: true,
       });
       wallet.ws.stop();
-      if (resp.retriesExceeded && args.finishPendingOpt.failOnMaxRetries) {
-        processExit(EXIT_RETRIES_EXCEEDED);
-      }
     });
   });
 
diff --git a/packages/taler-wallet-core/src/wallet.ts 
b/packages/taler-wallet-core/src/wallet.ts
index 0b7229cf3..d0095626a 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -63,7 +63,6 @@ import {
   codecForAcceptExchangeTosRequest,
   codecForAcceptManualWithdrawalRequet,
   codecForAcceptPeerPullPaymentRequest,
-  codecForAcceptTipRequest,
   codecForAddExchangeRequest,
   codecForAddGlobalCurrencyAuditorRequest,
   codecForAddGlobalCurrencyExchangeRequest,
@@ -104,7 +103,6 @@ import {
   codecForPreparePeerPullPaymentRequest,
   codecForPreparePeerPushCreditRequest,
   codecForPrepareRefundRequest,
-  codecForPrepareRewardRequest,
   codecForPrepareWithdrawExchangeRequest,
   codecForRecoverStoredBackupRequest,
   codecForRemoveGlobalCurrencyAuditorRequest,
@@ -249,9 +247,7 @@ import {
   processRefreshGroup,
 } from "./operations/refresh.js";
 import {
-  acceptTipBackwardCompat,
   computeRewardTransactionStatus,
-  prepareReward,
   processTip,
 } from "./operations/reward.js";
 import {
@@ -382,12 +378,6 @@ export async function runPending(ws: InternalWalletState): 
Promise<void> {
 }
 
 export interface RetryLoopOpts {
-  /**
-   * Stop when the number of retries is exceeded for any pending
-   * operation.
-   */
-  maxRetries?: number;
-
   /**
    * Stop the retry loop when all lifeness-giving pending operations
    * are done.
@@ -431,15 +421,6 @@ async function runTaskLoop(
     let minDue: AbsoluteTime = AbsoluteTime.never();
 
     for (const p of pending.pendingOperations) {
-      const maxRetries = opts.maxRetries;
-
-      if (maxRetries && p.retryInfo && p.retryInfo.retryCounter > maxRetries) {
-        retriesExceeded = true;
-        logger.warn(
-          `skipping, as ${maxRetries} retries are exceeded in an operation of 
type ${p.type}`,
-        );
-        continue;
-      }
       if (p.givesLifeness) {
         numGivingLiveness++;
       }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]