Skip to content

Commit

Permalink
Use a function call when a pipeline is only one function long
Browse files Browse the repository at this point in the history
  • Loading branch information
ademenev committed Aug 27, 2024
1 parent e66e558 commit 46cde3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}
7 changes: 5 additions & 2 deletions test/support/case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,11 @@ defmodule Oban.Case do

def insert_historical(state, timestamp_field, timestamp_age, scheduled_age) do
opts =
[state: state, scheduled_at: seconds_ago(scheduled_age)]
|> Keyword.put(timestamp_field, seconds_ago(timestamp_age))
Keyword.put(
[state: state, scheduled_at: seconds_ago(scheduled_age)],
timestamp_field,
seconds_ago(timestamp_age)
)

insert!(%{}, opts)
end
Expand Down

0 comments on commit 46cde3f

Please sign in to comment.