mirror of
https://github.com/oceanprotocol/react.git
synced 2024-07-01 06:02:20 +02:00
use compute logs
This commit is contained in:
parent
75d686992f
commit
54f8e07b60
|
@ -18,7 +18,7 @@ interface UseCompute {
|
||||||
// TODO: customize for compute
|
// TODO: customize for compute
|
||||||
export const computeFeedback: { [key in number]: string } = {
|
export const computeFeedback: { [key in number]: string } = {
|
||||||
...feedback,
|
...feedback,
|
||||||
3: '3/3 Access granted. Starting job...'
|
4: '3/3 Access granted. Starting job...'
|
||||||
}
|
}
|
||||||
const rawAlgorithmMeta: MetaDataAlgorithm = {
|
const rawAlgorithmMeta: MetaDataAlgorithm = {
|
||||||
rawcode: `console.log('Hello world'!)`,
|
rawcode: `console.log('Hello world'!)`,
|
||||||
|
@ -59,6 +59,7 @@ function useCompute(): UseCompute {
|
||||||
owner: accountId,
|
owner: accountId,
|
||||||
secretStoreUri: config.secretStoreUri
|
secretStoreUri: config.secretStoreUri
|
||||||
}
|
}
|
||||||
|
Logger.debug('useCompute computeOutput', computeOutput)
|
||||||
|
|
||||||
const agreement = await ocean.compute
|
const agreement = await ocean.compute
|
||||||
.order(account, did as string)
|
.order(account, did as string)
|
||||||
|
@ -66,7 +67,7 @@ function useCompute(): UseCompute {
|
||||||
setComputeStep(step)
|
setComputeStep(step)
|
||||||
setComputeStepText(computeFeedback[step])
|
setComputeStepText(computeFeedback[step])
|
||||||
})
|
})
|
||||||
|
Logger.debug('useCompute agreement', agreement)
|
||||||
rawAlgorithmMeta.container = computeContainer
|
rawAlgorithmMeta.container = computeContainer
|
||||||
rawAlgorithmMeta.rawcode = algorithmRawCode
|
rawAlgorithmMeta.rawcode = algorithmRawCode
|
||||||
setComputeStep(4)
|
setComputeStep(4)
|
||||||
|
@ -79,7 +80,7 @@ function useCompute(): UseCompute {
|
||||||
computeOutput
|
computeOutput
|
||||||
)
|
)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Logger.log(error)
|
Logger.error(error)
|
||||||
setComputeError(error.message)
|
setComputeError(error.message)
|
||||||
} finally {
|
} finally {
|
||||||
setComputeStep(undefined)
|
setComputeStep(undefined)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user