From 7f4c1921b7ec4a09b6a24b47373a868f2f3196be Mon Sep 17 00:00:00 2001 From: Alessio Biancalana Date: Thu, 24 Aug 2023 15:07:53 +0200 Subject: [PATCH] Update fake server --- demo/fake_server.ex | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/demo/fake_server.ex b/demo/fake_server.ex index 5c8027ac..f3423110 100644 --- a/demo/fake_server.ex +++ b/demo/fake_server.ex @@ -16,9 +16,15 @@ defmodule Wanda.Executions.FakeServer do @default_config [sleep: 2_000] @impl true - def start_execution(execution_id, group_id, targets, env, config \\ @default_config) do - default_target_type = "cluster" - env = Map.put(env, "target_type", default_target_type) + def start_execution( + execution_id, + group_id, + targets, + target_type, + env, + config \\ @default_config + ) do + env = Map.put(env, "target_type", target_type) checks = targets @@ -48,8 +54,7 @@ defmodule Wanda.Executions.FakeServer do evaluation_result ) - execution_completed = - Messaging.Mapper.to_execution_completed(evaluation_result, default_target_type) + execution_completed = Messaging.Mapper.to_execution_completed(evaluation_result, target_type) :ok = Messaging.publish("results", execution_completed) end