relay: fix invoking federator, use a timer to sleep the mix task to force a context switch

This commit is contained in:
William Pitcock 2018-08-06 07:27:11 +00:00
commit 266b314051
3 changed files with 6 additions and 2 deletions

View file

@ -8,5 +8,8 @@ defmodule Mix.Tasks.RelayFollow do
Mix.Task.run("app.start")
:ok = Relay.follow(target)
# put this task to sleep to allow the genserver to push out the messages
:timer.sleep(500)
end
end

View file

@ -8,5 +8,8 @@ defmodule Mix.Tasks.RelayUnfollow do
Mix.Task.run("app.start")
:ok = Relay.unfollow(target)
# put this task to sleep to allow the genserver to push out the messages
:timer.sleep(500)
end
end