mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
add compute stop and fix job with algodid
This commit is contained in:
parent
2deca53cc7
commit
f8ef12f8dc
@ -64,7 +64,6 @@ export class Compute extends Instantiable {
|
||||
tokenAddress: string,
|
||||
consumerAccount: Account,
|
||||
algorithmDid?: string,
|
||||
algorithmTokenAddress?: string,
|
||||
algorithmMeta?: MetadataAlgorithm,
|
||||
output?: Output,
|
||||
serviceIndex?: string,
|
||||
|
@ -192,7 +192,6 @@ export class Provider extends Instantiable {
|
||||
// 'algorithmDataToken': alg_data_token
|
||||
|
||||
// switch fetch method
|
||||
|
||||
let fetch
|
||||
|
||||
switch (method) {
|
||||
|
@ -293,7 +293,6 @@ describe('Marketplace flow', () => {
|
||||
tokenAddress,
|
||||
bob,
|
||||
undefined,
|
||||
undefined,
|
||||
algorithmMeta,
|
||||
output,
|
||||
computeService.index,
|
||||
@ -312,7 +311,11 @@ describe('Marketplace flow', () => {
|
||||
const response = await ocean.compute.status(bob, undefined, undefined)
|
||||
assert(response.length > 0)
|
||||
})
|
||||
|
||||
it('Bob should stop compute job', async () => {
|
||||
await ocean.compute.stop(bob, ddo.id, jobId)
|
||||
const response = await ocean.compute.status(bob, ddo.id, jobId)
|
||||
assert(response[0].stopreq === 1)
|
||||
})
|
||||
it('should not allow order the compute service with raw algo for dataset that does not allow raw algo', async () => {
|
||||
const service1 = datasetNoRawAlgo.findServiceByType('compute')
|
||||
assert(service1 !== null)
|
||||
@ -372,18 +375,18 @@ describe('Marketplace flow', () => {
|
||||
tx.transactionHash,
|
||||
tokenAddress,
|
||||
bob,
|
||||
algorithmAsset.id,
|
||||
undefined,
|
||||
undefined,
|
||||
algorithmMeta,
|
||||
output,
|
||||
computeService.index,
|
||||
computeService.type,
|
||||
algoTx,
|
||||
algorithmAsset.datatoken
|
||||
algoTx.transactionHash,
|
||||
algorithmAsset.dataToken
|
||||
)
|
||||
jobId = response.jobId
|
||||
assert(response.status >= 10)
|
||||
})
|
||||
|
||||
// it('Bob restarts compute job', async () => {})
|
||||
// it('Bob gets outputs', async () => {})
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user