Skip to content

Commit

Permalink
clear out unnecessary modules
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin67 committed Nov 27, 2023
1 parent 54e4755 commit ab2ab99
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 30 deletions.
10 changes: 6 additions & 4 deletions lib/inngest/function.ex
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,11 @@ defmodule Inngest.Function do
step: %Step{
id: :step,
name: "step",
runtime: %Step.RunTime{
runtime: %{
type: "http",
url: "#{Config.app_host() <> path}?fnId=#{id}&step=step"
},
retries: %Step.Retry{
retries: %{
attempts: 0
}
}
Expand All @@ -156,10 +157,11 @@ defmodule Inngest.Function do
step: %Step{
id: :step,
name: "step",
runtime: %Step.RunTime{
runtime: %{
type: "http",
url: "#{Config.app_host() <> path}?fnId=#{slug()}&step=step"
},
retries: %Step.Retry{
retries: %{
attempts: retries()
}
}
Expand Down
35 changes: 9 additions & 26 deletions lib/inngest/function/step.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,16 @@ defmodule Inngest.Function.Step do
name: binary(),
opts: map(),
mod: module(),
runtime: RunTime,
retries: Retry
runtime: runtime(),
retries: retry()
}

defmodule RunTime do
@moduledoc false

@derive Jason.Encoder
defstruct [
:url,
type: "http"
]

@type t() :: %__MODULE__{
type: binary(),
url: binary()
}
end

defmodule Retry do
@moduledoc false

@derive Jason.Encoder
defstruct attempts: 3
@type runtime() :: %{
url: binary(),
type: binary()
}

@type t() :: %__MODULE__{
attempts: number()
}
end
@type retry() :: %{
attempts: number()
}
end

0 comments on commit ab2ab99

Please sign in to comment.