Skip to content

Commit

Permalink
Update fake server
Browse files Browse the repository at this point in the history
  • Loading branch information
dottorblaster committed Aug 25, 2023
1 parent f76bbf7 commit 7f4c192
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions demo/fake_server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7f4c192

Please sign in to comment.