diff options
Diffstat (limited to 'opendc-faas')
2 files changed, 5 insertions, 4 deletions
diff --git a/opendc-faas/opendc-faas-service/src/main/kotlin/org/opendc/faas/service/deployer/FunctionInstance.kt b/opendc-faas/opendc-faas-service/src/main/kotlin/org/opendc/faas/service/deployer/FunctionInstance.kt index a8b04df4..77eadbbe 100644 --- a/opendc-faas/opendc-faas-service/src/main/kotlin/org/opendc/faas/service/deployer/FunctionInstance.kt +++ b/opendc-faas/opendc-faas-service/src/main/kotlin/org/opendc/faas/service/deployer/FunctionInstance.kt @@ -25,9 +25,9 @@ package org.opendc.faas.service.deployer import org.opendc.faas.service.FunctionObject /** - * A [FunctionInstance] is a a self-contained worker—typically a container—capable of handling function executions. + * A [FunctionInstance] is a self-contained worker—typically a container—capable of handling function executions. * - * Multiple, concurrent function instances can exists for a single function, for scalability purposes. + * Multiple, concurrent function instances can exist for a single function, for scalability purposes. */ public interface FunctionInstance : AutoCloseable { /** 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 } |
