diff --git a/backend/src/services/yagna/service.ts b/backend/src/services/yagna/service.ts index edec444..297b763 100644 --- a/backend/src/services/yagna/service.ts +++ b/backend/src/services/yagna/service.ts @@ -97,17 +97,21 @@ export class Yagna { let executor, worker, agreement; try { executor = await this.userContext.getExecutor(userId); + debugLog("yagna", "making agreement, executor found", userId); + //in order to make sure agreement wont be automatically closed after 90s //which is HARDCODED in yagna we make worker which under the hood makes activity // which prevents agreement from closing worker = await this.getUserWorker(userId); - + debugLog("yagna", "making agreement, worker found", userId); agreement = await worker.context?.activity.agreement; + debugLog("yagna", "making agreement, agreement found", agreement); } catch (e) { console.log("Error", e); } if (!agreement) { + debugLog("yagna", "Error making agreement, no agreement found", userId); throw new Error({ code: ErrorCode.UNABLE_TO_CREATE_AGREEMENT, }); @@ -288,7 +292,7 @@ export class Yagna { return new Promise(async (resolve, reject) => { const worker = this.userContext.getWorker(userId); if (worker) { - debugLog("yagna", "worker found", userId); + debugLog("yagna", "getUSerWorker: worker found", userId); const isConnected = await worker.isConnected(); if (isConnected) { debugLog("yagna", "worker connected", userId);