   end
 
   def queue_for_refresh(team) do
-    e = expires_in_unix(team)
-    n = :os.system_time(:seconds)
-    limit = @expiring_soon_in_seconds
     diff = expires_in_unix(team) - :os.system_time(:seconds)
-
-    require IEx; IEx.pry
 
     if diff < @expiring_soon_in_seconds do
       refresh_now(team)

  alias EspiDni.GoogleAnalyticsClient
  alias EspiDni.Team
  alias EspiDni.Repo
  import Ecto.Query, only: [from: 1, from: 2]

  @expiring_soon_in_seconds 60
  @refresh_wait_in_seconds 2_700

  end

  defp queue_delay_ms(time) do
    remaining_time = min(time, (time - @expiring_soon_in_seconds))
    remaining_time * @milliseconds_in_seconds
  end

end
