Skip to content

Commit

Permalink
fix sleep until and update test
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin67 committed Nov 7, 2023
1 parent 3aa7fb7 commit f6a7b07
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/inngest/step_tool.ex
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ defmodule Inngest.StepTool do
{:ok, datetime} ->
throw(%GeneratorOpCode{
id: hashed_id,
name: step_id,
name: datetime,
display_name: datetime,
op: op.op
})
Expand Down
2 changes: 1 addition & 1 deletion test/inngest/router/plug_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ defmodule Inngest.Router.PlugTest do
"data" => %{
"event_id" => ^event_id,
"run_id" => ^run_id,
"output" => "yolo",
"output" => "awake",
"status" => "Completed"
}
}} = DevServer.fn_run(run_id)
Expand Down
5 changes: 2 additions & 3 deletions test/support/cases/sleep_until_fn.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ defmodule Inngest.Test.Case.SleepUntilFn do
until =
step.run(ctx, "until", fn ->
Timex.now()
|> Timex.shift(seconds: 30)
|> Timex.format!("{ISO:Extended:Z}")
|> Timex.shift(seconds: 9)
|> Timex.format!("{YYYY}-{0M}-{0D}T{h24}:{m}:{s}Z")
end)
|> IO.inspect()

step.sleep_until(ctx, "test-sleep-until", until)

Expand Down

0 comments on commit f6a7b07

Please sign in to comment.