diff options
Diffstat (limited to 'lib/mix')
-rw-r--r-- | lib/mix/tasks/relay_follow.ex | 6 | ||||
-rw-r--r-- | lib/mix/tasks/relay_unfollow.ex | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/mix/tasks/relay_follow.ex b/lib/mix/tasks/relay_follow.ex index 39cecb71b..bec63af7c 100644 --- a/lib/mix/tasks/relay_follow.ex +++ b/lib/mix/tasks/relay_follow.ex @@ -14,11 +14,13 @@ defmodule Mix.Tasks.RelayFollow do def run([target]) do Mix.Task.run("app.start") - with :ok <- Relay.follow(target) do + {status, message} = Relay.follow(target) + + if :ok == status do # put this task to sleep to allow the genserver to push out the messages :timer.sleep(500) else - e -> Mix.puts("Error: #{inspect(e)}") + Mix.puts("Error: #{inspect(message)}") end end end diff --git a/lib/mix/tasks/relay_unfollow.ex b/lib/mix/tasks/relay_unfollow.ex index 5f12bd9ea..df719af2b 100644 --- a/lib/mix/tasks/relay_unfollow.ex +++ b/lib/mix/tasks/relay_unfollow.ex @@ -13,11 +13,13 @@ defmodule Mix.Tasks.RelayUnfollow do def run([target]) do Mix.Task.run("app.start") - with :ok <- Relay.unfollow(target) do + {status, message} = Relay.unfollow(target) + + if :ok == status do # put this task to sleep to allow the genserver to push out the messages :timer.sleep(500) else - e -> Mix.puts("Error: #{inspect(e)}") + Mix.puts("Error: #{inspect(message)}") end end end |