diff --git a/src/commands.ts b/src/commands.ts index 3aec3eb..b413623 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -576,6 +576,11 @@ export class Commands { } public async getJobStatus(args: string[]) { + // args[1] - did (for checking if data asset exists, legacy) + // args[2] - jobId + // args[3] - agreementId + const hasAgreementId = args.length === 4; + const dataDdo = await this.aquarius.waitForAqua(args[1]); if (!dataDdo) { console.error( @@ -583,6 +588,11 @@ export class Commands { ); return; } + const jobId = args[2] + let agreementId = null; + if(hasAgreementId) { + agreementId = args[3]; + } const providerURI = this.macOsProviderUrl && dataDdo.chainId === 8996 ? this.macOsProviderUrl @@ -591,8 +601,8 @@ export class Commands { const jobStatus = (await ProviderInstance.computeStatus( providerURI, await this.signer.getAddress(), - args[2], - args[1] + jobId, + agreementId )) as ComputeJob; console.log(util.inspect(jobStatus, false, null, true)); }