From 0b4c8e9b09a128bd52105ae91e9487b6efbf2d21 Mon Sep 17 00:00:00 2001 From: Fabrizio Sestito Date: Wed, 12 Oct 2022 21:49:32 +0200 Subject: [PATCH] Add aliases to server --- lib/wanda/execution/server.ex | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/wanda/execution/server.ex b/lib/wanda/execution/server.ex index ebe01809..095f3bd2 100644 --- a/lib/wanda/execution/server.ex +++ b/lib/wanda/execution/server.ex @@ -6,8 +6,18 @@ defmodule Wanda.Execution.Server do use GenServer, restart: :transient - alias Wanda.Execution.{Evaluation, Gathering, State, Target} - alias Wanda.Messaging + alias Wanda.Execution.{ + Evaluation, + Gathering, + Result, + State, + Target + } + + alias Wanda.{ + Messaging, + Results + } require Logger @@ -137,8 +147,8 @@ defmodule Wanda.Execution.Server do end end - defp store_and_publish_execution_result(%Wanda.Execution.Result{} = result) do - Wanda.Results.create_execution_result(result) + defp store_and_publish_execution_result(%Result{} = result) do + Results.create_execution_result(result) execution_completed = Messaging.Mapper.to_execution_completed(result) :ok = Messaging.publish("results", execution_completed)