Timex.now(timezone)

Sorry @thojanssens1 I was handling some other things last week.

:at is consumed through a function in the orechestrator:

  defp to_entry_point_map(entry_point) do
    %{
      queue: Keyword.fetch!(entry_point, :queue),
      ...
      at: Keyword.get(entry_point, :at)
    }
  end

That function is called by the orchestrate function:

  def orchestrate(opts \\ []) do
    exq_pid = opts[:exq_pid] || ExqApi
    {:ok, scheduled_jobs} = ExqApi.scheduled(exq_pid)

    for entry_point <- entry_points() do
      entry_point
      |> to_entry_point_map()
      |> start_missing_jobs!(scheduled_jobs)
    end
  end

start_missing_jobs!/2 starts jobs that are scheduled based on the arguments consumed from to_entry_point_map/1

1 Like

Sorry, I was asking how :at value is consumed, but you show the code that passes around the value, but not the code that really uses the value. :at is passed to start_missing_jobs!/2, but I still don’t know how the value is used.

More specifically (why I’m asking that), is I want to know what time zone is used, as you said your server is configured in UTC. So :at is 13pm (at: {13, 0, 0}) in what time zone?

and also code of do_format(date, @time_format)

Ok this is very embarrassing… The original solution with the timezone did fix this issue. The continued issues we were seeing were due to a recent change in our deployments, we were just deploying an old release :man_facepalming:. We only deploy once a week or so otherwise I think we would have caught that sooner.

1 Like

I had that feeling :sweat_smile:

1 Like