mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 21:47:59 +01:00
sleep first, then request
This commit is contained in:
parent
e0e0d3c84d
commit
e33be9c8de
2 changed files with 4 additions and 2 deletions
|
@ -17,13 +17,14 @@ defmodule Philomena.Servers.PicartoChannelUpdater do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp run do
|
defp run do
|
||||||
|
:timer.sleep(:timer.seconds(60))
|
||||||
|
|
||||||
now = DateTime.utc_now() |> DateTime.truncate(:second)
|
now = DateTime.utc_now() |> DateTime.truncate(:second)
|
||||||
|
|
||||||
@api_online
|
@api_online
|
||||||
|> Philomena.Http.get!()
|
|> Philomena.Http.get!()
|
||||||
|> handle_response(now)
|
|> handle_response(now)
|
||||||
|
|
||||||
:timer.sleep(:timer.seconds(60))
|
|
||||||
run()
|
run()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,14 @@ defmodule Philomena.Servers.PiczelChannelUpdater do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp run do
|
defp run do
|
||||||
|
:timer.sleep(:timer.seconds(60))
|
||||||
|
|
||||||
now = DateTime.utc_now() |> DateTime.truncate(:second)
|
now = DateTime.utc_now() |> DateTime.truncate(:second)
|
||||||
|
|
||||||
@api_online
|
@api_online
|
||||||
|> Philomena.Http.get!()
|
|> Philomena.Http.get!()
|
||||||
|> handle_response(now)
|
|> handle_response(now)
|
||||||
|
|
||||||
:timer.sleep(:timer.seconds(60))
|
|
||||||
run()
|
run()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue