Skip to content

Commit cb1a086

Browse files
committed
delete unused code
1 parent 2ca3729 commit cb1a086

File tree

4 files changed

+18
-91
lines changed

4 files changed

+18
-91
lines changed

lib/algora/integrations/github/poller/search.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ defmodule Algora.Github.Poller.Search do
207207
end
208208
end
209209

210-
defp search(q, opts \\ []) do
210+
defp search(q, opts) do
211211
per_page = opts[:per_page] || @per_page
212212

213213
search_query =

lib/algora/integrations/github/poller/supervisor.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ defmodule Algora.Github.Poller.Supervisor do
33
use DynamicSupervisor
44

55
alias Algora.Github.Poller.Search, as: SearchPoller
6-
alias Algora.Github.TokenPool
76
alias Algora.Search
8-
alias Algora.Workspace
97

108
require Logger
119

lib/algora_web/live/home_live.ex

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ defmodule AlgoraWeb.HomeLive do
44

55
import Ecto.Changeset
66
import Ecto.Query
7-
import Phoenix.LiveView.TagEngine
8-
import Tails, only: [classes: 1]
97

108
alias Algora.Accounts
119
alias Algora.Accounts.User
@@ -17,7 +15,6 @@ defmodule AlgoraWeb.HomeLive do
1715
alias Algora.Workspace
1816
alias AlgoraWeb.Components.Footer
1917
alias AlgoraWeb.Components.Header
20-
alias AlgoraWeb.Components.Logos
2118
alias AlgoraWeb.Components.Wordmarks
2219
alias AlgoraWeb.Data.PlatformStats
2320
alias AlgoraWeb.Forms.BountyForm
@@ -1035,75 +1032,6 @@ defmodule AlgoraWeb.HomeLive do
10351032
) || 0
10361033
end
10371034

1038-
defp logo_cloud(assigns) do
1039-
assigns =
1040-
assign(
1041-
assigns,
1042-
:orgs,
1043-
Enum.map(
1044-
[
1045-
%{
1046-
name: "ZIO",
1047-
url: "https://zio.dev",
1048-
args: %{
1049-
src: ~p"/images/wordmarks/zio.png",
1050-
class: "mt-4 max-h-10 brightness-0 invert"
1051-
}
1052-
},
1053-
%{
1054-
name: "Tailcall",
1055-
url: "https://tailcall.run",
1056-
component: &Wordmarks.tailcall/1,
1057-
args: %{class: "max-h-12", fill: "#fff"}
1058-
},
1059-
%{name: "Cal.com", url: "https://cal.com", component: &Wordmarks.calcom/1},
1060-
%{
1061-
name: "Qdrant",
1062-
url: "https://qdrant.tech",
1063-
component: &Wordmarks.qdrant/1,
1064-
args: %{class: "max-h-9"}
1065-
},
1066-
%{
1067-
name: "Golem Cloud",
1068-
url: "https://www.golem.cloud",
1069-
component: &Wordmarks.golemcloud/1,
1070-
args: %{class: "max-h-9"}
1071-
},
1072-
%{
1073-
name: "Remotion",
1074-
url: "https://remotion.dev",
1075-
args: %{
1076-
src: "https://algora.io/banners/remotion.png",
1077-
class: "max-h-10 brightness-0 invert sm:hidden"
1078-
}
1079-
}
1080-
],
1081-
fn org ->
1082-
org
1083-
|> Map.put_new(:args, %{})
1084-
|> update_in([:args, :class], &classes(["max-h-6 w-full object-contain", &1]))
1085-
|> put_in([:args, :alt], org.name)
1086-
end
1087-
)
1088-
)
1089-
1090-
~H"""
1091-
<%= for org <- @orgs do %>
1092-
<div class="flex items-center justify-center">
1093-
<%= if org[:component] do %>
1094-
{component(
1095-
org.component,
1096-
org.args,
1097-
{__ENV__.module, __ENV__.function, __ENV__.file, __ENV__.line}
1098-
)}
1099-
<% else %>
1100-
<img {org.args} />
1101-
<% end %>
1102-
</div>
1103-
<% end %>
1104-
"""
1105-
end
1106-
11071035
defp format_money(money), do: money |> Money.round(currency_digits: 0) |> Money.to_string!(no_fraction_if_integer: true)
11081036

11091037
defp format_number(number), do: Number.Delimit.number_to_delimited(number, precision: 0)

lib/algora_web/live/swift_bounties_live.ex

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -652,22 +652,23 @@ defmodule AlgoraWeb.SwiftBountiesLive do
652652
end
653653

654654
defp assign_active_repos(socket) do
655-
active_pollers =
656-
Enum.reduce(Algora.Github.Poller.Supervisor.which_children(), [], fn {_, pid, _, _}, acc ->
657-
{owner, name} = GenServer.call(pid, :get_repo_info)
658-
659-
case Algora.Github.Poller.Supervisor.find_child(owner, name) do
660-
{_, pid, _, _} ->
661-
if GenServer.call(pid, :is_paused) do
662-
acc
663-
else
664-
[{owner, name} | acc]
665-
end
666-
667-
_ ->
668-
acc
669-
end
670-
end)
655+
active_pollers = []
656+
# active_pollers =
657+
# Enum.reduce(Algora.Github.Poller.Supervisor.which_children(), [], fn {_, pid, _, _}, acc ->
658+
# {owner, name} = GenServer.call(pid, :get_repo_info)
659+
660+
# case Algora.Github.Poller.Supervisor.find_child(owner, name) do
661+
# {_, pid, _, _} ->
662+
# if GenServer.call(pid, :is_paused) do
663+
# acc
664+
# else
665+
# [{owner, name} | acc]
666+
# end
667+
668+
# _ ->
669+
# acc
670+
# end
671+
# end)
671672

672673
# Build dynamic OR conditions for each owner/name pair
673674
conditions =

0 commit comments

Comments
 (0)