Skip to content

Commit

Permalink
Merge branch 'main' into skander/feed-segments
Browse files Browse the repository at this point in the history
  • Loading branch information
skanderm committed Jun 7, 2024
2 parents af1c01b + 0185eaf commit 7a09fbc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ The new version (v3) is currently under development, rapidly changing, and has n
For the moment, this app is running in a Heroku instance with `mix phx.server`. To access the console, run:

```
heroku run POOL_SIZE=2 iex -a <app name> -- -S mix
heroku run FEED_STREAM_QUEUE_URL="" REDIS_URL="" POOL_SIZE=2 iex -a <app name> -- -S mix
```

The `POOL_SIZE` config var is necessary due to the current Postgres db having 20 connections. You can read more [about it here](https://hexdocs.pm/phoenix/heroku.html#creating-environment-variables-in-heroku).
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
},
"addons": [
"heroku-postgresql:mini",
"heroku-postgresql:essential-0",
"autoidle:hobby-web",
"heroku-redis:mini"
],
Expand Down
4 changes: 3 additions & 1 deletion server/config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ if config_env() == :prod do
host = System.get_env("HOST_URL") || "live.orcasite.com"
port = String.to_integer(System.get_env("PORT") || "4000")

config :orcasite, :feed_stream_queue_url, System.get_env("FEED_STREAM_QUEUE_URL")
if System.get_env("FEED_STREAM_QUEUE_URL", "") != "" do
config :orcasite, :feed_stream_queue_url, System.get_env("FEED_STREAM_QUEUE_URL")
end

config :orcasite, OrcasiteWeb.Endpoint,
url: [host: host, port: 443, scheme: "https"],
Expand Down
2 changes: 1 addition & 1 deletion server/lib/orcasite/radio/detection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ defmodule Orcasite.Radio.Detection do
change fn
changeset, %{actor: %Orcasite.Accounts.User{} = actor} ->
changeset
|> Ash.Changeset.manage_relationship(:created_by_user, actor, type: :append)
|> Ash.Changeset.manage_relationship(:user, actor, type: :append)

changeset, _ ->
changeset
Expand Down
3 changes: 3 additions & 0 deletions server/lib/orcasite/radio/feed_stream_queue.ex
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ defmodule Orcasite.Radio.FeedStreamQueue do
{:ok, %{"Records" => records}} -> records
_ -> []
end

_ ->
[]
end
end)
|> Enum.flat_map(fn %{"s3" => %{"object" => %{"key" => object_path}}} ->
Expand Down

0 comments on commit 7a09fbc

Please sign in to comment.