From 22856f15698bd4347a5e0a6db4944f392f138820 Mon Sep 17 00:00:00 2001 From: Marcin Gordel Date: Tue, 9 Jul 2024 09:29:44 +0200 Subject: [PATCH] fix(job): fixed rental finalization after job completed --- src/experimental/job/job.ts | 2 +- src/experimental/job/job_manager.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/experimental/job/job.ts b/src/experimental/job/job.ts index da208eef5..cc60e725e 100644 --- a/src/experimental/job/job.ts +++ b/src/experimental/job/job.ts @@ -151,7 +151,7 @@ export class Job { signal.addEventListener("abort", onAbort, { once: true }); - return workOnGolem(exeUnit); + return workOnGolem(exeUnit).finally(() => rental.stopAndFinalize()); } /** diff --git a/src/experimental/job/job_manager.ts b/src/experimental/job/job_manager.ts index ea44fc62a..8a1d8fc8d 100644 --- a/src/experimental/job/job_manager.ts +++ b/src/experimental/job/job_manager.ts @@ -41,6 +41,7 @@ export class JobManager { url: this.config?.yagna?.basePath, }, dataTransferProtocol: storageProvider, + logger: this.logger, }); }