1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-01 15:55:34 +01:00
docs/developers/ocean-cli/downloading-compute-results.md
2023-09-29 10:50:51 +03:00

22 lines
1.6 KiB
Markdown

# Downloading compute results
To retrieve the compute results, we'll employ two distinct methods. Initially, we'll use the getJobStatus method, where we'll wait for or periodically check the status until it indicates that the job is finished. Subsequently, we'll utilize the method to obtain the actual results.
For the first method, you'll need both the dataset DID and the compute job DID. You can execute the following command:
```bash
npm run cli getJobStatus 'DATASET_DID' 'JOB_ID'
```
This command will enable you to monitor the status of the job and ensure it has completed successfully.
<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2FGURaTt0siyBHMDLwD1s5%2FScreenshot%202023-09-28%20at%2001.59.14.png?alt=media&token=528bd4e0-4a48-43f1-924d-c32976a7663b" alt=""><figcaption>getJobStatus</figcaption></figure>
For the second method, the dataset DID is no longer required. Instead, you'll need to specify the job ID, the index of the result you wish to download from the available results for that job, and the destination folder where you want to save the downloaded content. The corresponding command is as follows:
```bash
npm run cli downloadJobResults 'JOB_ID' 'RESULT_INDEX' 'DESTINATION_FOLDER'
```
<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2FjvvCAOQVQvAv2ygNtPby%2FScreenshot%202023-09-28%20at%2002.01.42.png?alt=media&token=da8868d7-6fdb-4dce-ac9a-6b395a0960e5" alt=""><figcaption>downloadJobResults</figcaption></figure>