mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
added no cache fetch policy on appolo request and removed debug logs
This commit is contained in:
parent
e73d140012
commit
fadffb5d87
@ -136,7 +136,6 @@ export default function Compute({
|
|||||||
timeout.toString()
|
timeout.toString()
|
||||||
)
|
)
|
||||||
const assetType = ddo.findServiceByType('metadata').attributes.main.type
|
const assetType = ddo.findServiceByType('metadata').attributes.main.type
|
||||||
console.log('checkPreviousOrders asset ' + assetType + ' id= ', orderId)
|
|
||||||
if (assetType === 'algorithm') {
|
if (assetType === 'algorithm') {
|
||||||
setPreviousAlgorithmOrderId(orderId)
|
setPreviousAlgorithmOrderId(orderId)
|
||||||
setHasPreviousAlgorithmOrder(!!orderId)
|
setHasPreviousAlgorithmOrder(!!orderId)
|
||||||
@ -431,10 +430,8 @@ export default function Compute({
|
|||||||
|
|
||||||
Logger.log('[compute] Starting compute job response: ', response)
|
Logger.log('[compute] Starting compute job response: ', response)
|
||||||
|
|
||||||
// setHasPreviousDatasetOrder(true)
|
await checkPreviousOrders(selectedAlgorithmAsset)
|
||||||
// setHasPreviousAlgorithmOrder(true)
|
await checkPreviousOrders(ddo)
|
||||||
checkPreviousOrders(selectedAlgorithmAsset)
|
|
||||||
checkPreviousOrders(ddo)
|
|
||||||
setIsPublished(true)
|
setIsPublished(true)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setError('Failed to start job!')
|
setError('Failed to start job!')
|
||||||
|
@ -53,7 +53,8 @@ async function fetchData(
|
|||||||
const client = getApolloClientInstance()
|
const client = getApolloClientInstance()
|
||||||
const response = await client.query({
|
const response = await client.query({
|
||||||
query: query,
|
query: query,
|
||||||
variables: variables
|
variables: variables,
|
||||||
|
fetchPolicy: 'no-cache'
|
||||||
})
|
})
|
||||||
return response
|
return response
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -75,14 +76,9 @@ export async function getPreviousOrders(
|
|||||||
variables
|
variables
|
||||||
)
|
)
|
||||||
if (fetchedPreviousOrders.data?.tokenOrders?.length === 0) return null
|
if (fetchedPreviousOrders.data?.tokenOrders?.length === 0) return null
|
||||||
console.log('order fetchedPreviousOrders', fetchedPreviousOrders?.data)
|
|
||||||
if (assetTimeout === '0') {
|
if (assetTimeout === '0') {
|
||||||
return fetchedPreviousOrders?.data?.tokenOrders[0]?.tx
|
return fetchedPreviousOrders?.data?.tokenOrders[0]?.tx
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
|
||||||
'order timestamp',
|
|
||||||
fetchedPreviousOrders?.data?.tokenOrders[0]?.timestamp
|
|
||||||
)
|
|
||||||
const expiry =
|
const expiry =
|
||||||
fetchedPreviousOrders?.data?.tokenOrders[0]?.timestamp * 1000 +
|
fetchedPreviousOrders?.data?.tokenOrders[0]?.timestamp * 1000 +
|
||||||
Number(assetTimeout) * 1000
|
Number(assetTimeout) * 1000
|
||||||
|
Loading…
Reference in New Issue
Block a user