mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +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
|
||||
|
||||
defp run do
|
||||
:timer.sleep(:timer.seconds(60))
|
||||
|
||||
now = DateTime.utc_now() |> DateTime.truncate(:second)
|
||||
|
||||
@api_online
|
||||
|> Philomena.Http.get!()
|
||||
|> handle_response(now)
|
||||
|
||||
:timer.sleep(:timer.seconds(60))
|
||||
run()
|
||||
end
|
||||
|
||||
|
|
|
@ -17,13 +17,14 @@ defmodule Philomena.Servers.PiczelChannelUpdater do
|
|||
end
|
||||
|
||||
defp run do
|
||||
:timer.sleep(:timer.seconds(60))
|
||||
|
||||
now = DateTime.utc_now() |> DateTime.truncate(:second)
|
||||
|
||||
@api_online
|
||||
|> Philomena.Http.get!()
|
||||
|> handle_response(now)
|
||||
|
||||
:timer.sleep(:timer.seconds(60))
|
||||
run()
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue