summaryrefslogtreecommitdiff
path: root/opendc-faas/opendc-faas-simulator/src
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-faas/opendc-faas-simulator/src')
-rw-r--r--opendc-faas/opendc-faas-simulator/src/main/kotlin/org/opendc/faas/simulator/SimFunctionDeployer.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/opendc-faas/opendc-faas-simulator/src/main/kotlin/org/opendc/faas/simulator/SimFunctionDeployer.kt b/opendc-faas/opendc-faas-simulator/src/main/kotlin/org/opendc/faas/simulator/SimFunctionDeployer.kt
index 020d75b5..68233c1a 100644
--- a/opendc-faas/opendc-faas-simulator/src/main/kotlin/org/opendc/faas/simulator/SimFunctionDeployer.kt
+++ b/opendc-faas/opendc-faas-simulator/src/main/kotlin/org/opendc/faas/simulator/SimFunctionDeployer.kt
@@ -36,6 +36,7 @@ import org.opendc.simulator.compute.SimMachine
import org.opendc.simulator.compute.model.MachineModel
import org.opendc.simulator.compute.power.ConstantPowerModel
import org.opendc.simulator.compute.power.SimplePowerDriver
+import org.opendc.simulator.compute.runWorkload
import org.opendc.simulator.flow.FlowEngine
import java.time.Clock
import java.util.ArrayDeque
@@ -114,7 +115,7 @@ public class SimFunctionDeployer(
override fun close() {
state = FunctionInstanceState.Deleted
stop()
- machine.close()
+ machine.cancel()
}
override fun toString(): String = "FunctionInstance[state=$state]"
@@ -130,7 +131,7 @@ public class SimFunctionDeployer(
launch {
try {
- machine.run(workload)
+ machine.runWorkload(workload)
} finally {
state = FunctionInstanceState.Deleted
}