Skip to content

Commit

Permalink
fix invalid args for Tinybird pruner
Browse files Browse the repository at this point in the history
  • Loading branch information
yujonglee committed Oct 29, 2024
1 parent 42cd1d4 commit 0d2d0a3
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions core/lib/canary/workers/project_manager.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ defmodule Canary.Workers.ProjectManager do
else
{:ok, projects} = Ash.read(Canary.Accounts.Project)

pruner_jobs =
projects
|> Enum.map(&Canary.Workers.TinybirdPruner.new(%{account_id: &1.id}))

alias_jobs =
projects
|> Enum.map(&Canary.Workers.QueryAliases.new(%{project_id: &1.id}))

Oban.insert_all(pruner_jobs ++ alias_jobs)
projects
|> Enum.flat_map(fn %{id: id} ->
[
Canary.Workers.TinybirdPruner.new(%{project_id: id}),
Canary.Workers.QueryAliases.new(%{project_id: id})
]
end)
|> Oban.insert_all()

:ok
end
Expand Down

0 comments on commit 0d2d0a3

Please sign in to comment.