Skip to content

Commit

Permalink
Merge pull request #1500 from rszwajko/fetchAndPut
Browse files Browse the repository at this point in the history
Fetch and put into store VMs while checking VM state
  • Loading branch information
sgratch authored Aug 11, 2021
2 parents 1474b64 + 21265c1 commit 0e162bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sagas/vmChanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as C from '_/constants'
import { arrayMatch } from '_/utils'

import { callExternalAction, delay, delayInMsSteps } from './utils'
import { addVmNic, fetchSingleVm } from './index'
import { addVmNic, fetchAndPutSingleVm } from './index'
import { createDiskForVm } from './disks'

function* createMemoryPolicyFromCluster (clusterId, memorySize) {
Expand Down Expand Up @@ -265,7 +265,7 @@ function* createVm (action) {
if (action.payload.pushToDetailsOnSuccess) {
yield put(A.navigateToVmDetails(`/vm/${vmId}`))
} else {
yield fetchSingleVm(A.getSingleVm({ vmId }))
yield fetchAndPutSingleVm(A.getSingleVm({ vmId }))
}
return vmId
}
Expand All @@ -291,7 +291,7 @@ function* waitForVmToBeUnlocked (vmId, isCloning = false) {
}
}

yield fetchSingleVm(A.getSingleVm({ vmId }))
yield fetchAndPutSingleVm(A.getSingleVm({ vmId }))
}
}

Expand Down

0 comments on commit 0e162bf

Please sign in to comment.