diff options
Diffstat (limited to 'packages/taler-wallet-core/src/shepherd.ts')
-rw-r--r-- | packages/taler-wallet-core/src/shepherd.ts | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |