[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: taler-wallet-cli: don't run t
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: taler-wallet-cli: don't run task loop before init |
Date: |
Tue, 05 Mar 2024 00:08:44 +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 74fcd99c8 taler-wallet-cli: don't run task loop before init
74fcd99c8 is described below
commit 74fcd99c8d3dcbc1d1ac3086dce0a9ed0e07c519
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Mar 5 00:08:39 2024 +0100
taler-wallet-cli: don't run task loop before init
---
packages/taler-wallet-cli/src/index.ts | 7 -------
packages/taler-wallet-core/src/pay-merchant.ts | 2 --
packages/taler-wallet-core/src/shepherd.ts | 4 +++-
3 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/packages/taler-wallet-cli/src/index.ts
b/packages/taler-wallet-cli/src/index.ts
index 9d25feb0f..b54e0e21f 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -1223,13 +1223,6 @@ advancedCli
};
const wh = await createLocalWallet(args, onNotif, args.serve.noInit);
const w = wh.wallet;
- w.runTaskLoop()
- .then((res) => {
- logger.warn("task loop exited unexpectedly");
- })
- .catch((e) => {
- logger.error(`error in task loop: ${e}`);
- });
let nextClientId = 1;
const notifyHandlers = new Map<number, (n: WalletNotification) => void>();
w.addNotificationListener((n) => {
diff --git a/packages/taler-wallet-core/src/pay-merchant.ts
b/packages/taler-wallet-core/src/pay-merchant.ts
index e92156572..05cbd26b7 100644
--- a/packages/taler-wallet-core/src/pay-merchant.ts
+++ b/packages/taler-wallet-core/src/pay-merchant.ts
@@ -1723,8 +1723,6 @@ async function waitPaymentResult(
waitSessionId?: string,
): Promise<ConfirmPayResult> {
const ctx = new PayMerchantTransactionContext(wex, proposalId);
-
- wex.taskScheduler.ensureRunning();
wex.taskScheduler.startShepherdTask(ctx.taskId);
// FIXME: Clean up using the new JS "using" / Symbol.dispose syntax.
diff --git a/packages/taler-wallet-core/src/shepherd.ts
b/packages/taler-wallet-core/src/shepherd.ts
index 6f2b2fa44..db090c352 100644
--- a/packages/taler-wallet-core/src/shepherd.ts
+++ b/packages/taler-wallet-core/src/shepherd.ts
@@ -162,7 +162,7 @@ export class TaskSchedulerImpl implements TaskScheduler {
constructor(private ws: InternalWalletState) {}
- async loadTasksFromDb(): Promise<void> {
+ private async loadTasksFromDb(): Promise<void> {
const activeTasks = await getActiveTaskIds(this.ws);
logger.info(`active tasks from DB: ${j2s(activeTasks)}`);
@@ -227,6 +227,7 @@ export class TaskSchedulerImpl implements TaskScheduler {
}
startShepherdTask(taskId: TaskIdStr): void {
+ this.ensureRunning();
// Run in the background, no await!
this.internalStartShepherdTask(taskId);
}
@@ -237,6 +238,7 @@ export class TaskSchedulerImpl implements TaskScheduler {
* Mostly useful to interrupt all waits when time-travelling.
*/
reload() {
+ this.ensureRunning();
const tasksIds = [...this.sheps.keys()];
logger.info(`reloading sheperd with ${tasksIds.length} tasks`);
for (const taskId of tasksIds) {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: taler-wallet-cli: don't run task loop before init,
gnunet <=