Skip to content

Commit

Permalink
PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineAugusti committed Dec 19, 2024
1 parent 3c42587 commit b9a40ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ defmodule TransportWeb.Plugs.WorkerHealthcheck do

def app_started_recently? do
{delay, unit} = @app_start_waiting_delay
DateTime.before?(DateTime.utc_now(), DateTime.add(app_start_datetime(), delay, unit))
DateTime.diff(DateTime.utc_now(), app_start_datetime(), unit) < delay
end

def app_start_datetime do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
defmodule TransportWeb.Plugs.WorkerHealthcheckTest do
# async: false is required because we use real in-memory caching in these tests
# async: false is required because we use real in-memory caching in these tests,
# and we swap application config (shared state)
use TransportWeb.ConnCase, async: false
alias TransportWeb.Plugs.WorkerHealthcheck

Expand Down

0 comments on commit b9a40ec

Please sign in to comment.