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()
|
||||
)
|
||||
const assetType = ddo.findServiceByType('metadata').attributes.main.type
|
||||
console.log('checkPreviousOrders asset ' + assetType + ' id= ', orderId)
|
||||
if (assetType === 'algorithm') {
|
||||
setPreviousAlgorithmOrderId(orderId)
|
||||
setHasPreviousAlgorithmOrder(!!orderId)
|
||||
@ -431,10 +430,8 @@ export default function Compute({
|
||||
|
||||
Logger.log('[compute] Starting compute job response: ', response)
|
||||
|
||||
// setHasPreviousDatasetOrder(true)
|
||||
// setHasPreviousAlgorithmOrder(true)
|
||||
checkPreviousOrders(selectedAlgorithmAsset)
|
||||
checkPreviousOrders(ddo)
|
||||
await checkPreviousOrders(selectedAlgorithmAsset)
|
||||
await checkPreviousOrders(ddo)
|
||||
setIsPublished(true)
|
||||
} catch (error) {
|
||||
setError('Failed to start job!')
|
||||
|
@ -53,7 +53,8 @@ async function fetchData(
|
||||
const client = getApolloClientInstance()
|
||||
const response = await client.query({
|
||||
query: query,
|
||||
variables: variables
|
||||
variables: variables,
|
||||
fetchPolicy: 'no-cache'
|
||||
})
|
||||
return response
|
||||
} catch (error) {
|
||||
@ -75,14 +76,9 @@ export async function getPreviousOrders(
|
||||
variables
|
||||
)
|
||||
if (fetchedPreviousOrders.data?.tokenOrders?.length === 0) return null
|
||||
console.log('order fetchedPreviousOrders', fetchedPreviousOrders?.data)
|
||||
if (assetTimeout === '0') {
|
||||
return fetchedPreviousOrders?.data?.tokenOrders[0]?.tx
|
||||
} else {
|
||||
console.log(
|
||||
'order timestamp',
|
||||
fetchedPreviousOrders?.data?.tokenOrders[0]?.timestamp
|
||||
)
|
||||
const expiry =
|
||||
fetchedPreviousOrders?.data?.tokenOrders[0]?.timestamp * 1000 +
|
||||
Number(assetTimeout) * 1000
|
||||
|
Loading…
Reference in New Issue
Block a user