mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
1.2 KiB
1.2 KiB
title | description |
---|---|
Get Status of a Compute Job | Get Status of a Compute Job |
Requirements
For this setup, we need a compute job that has been started from Compute using a published algorithm on a Data Set or Compute using a raw algorithm on a Data Set
Create an Area to display the status
First, let's define an area to display status:
GITHUB-EMBED 107d1fa7d0/src/Compute.js
jsx 213-226 GITHUB-EMBED
Get Job Status
Since we have the agreementId and jobId, we can get status from a compute job:
GITHUB-EMBED 107d1fa7d0/src/Compute.js
jsx 106 GITHUB-EMBED
Final Result
Let's wrap that into a function:
GITHUB-EMBED 107d1fa7d0/src/Compute.js
jsx 102-112 GITHUB-EMBED
and have a button for it:
GITHUB-EMBED 107d1fa7d0/src/Compute.js
jsx 223 GITHUB-EMBED
** Notice that the button will be disabled if jobId is missing.