neiam
/apollos_crib
It's Apollo's Crib
public · Issues · Pulls 1 · Labels · Forks · Compare · Actions failure · Badges · Packages
⭐
Log in to mark this repository.
missing migrations in prod somehow
c8f28ea · gmorell · 2023-02-16 15:59
Files changed
modified
apps/room_gtfs/lib/gtfs-realtime.pb.ex
+2
−0
@@ -79,6 +79,8 @@ defmodule TransitRealtime.Alert.Effect do
| 79 | 79 | field :OTHER_EFFECT, 7 |
| 80 | 80 | field :UNKNOWN_EFFECT, 8 |
| 81 | 81 | field :STOP_MOVED, 9 |
| 82 | + field :NO_EFFECT, 10 | |
| 83 | + field :ACCESSIBILITY_ISSUE, 11 | |
| 82 | 84 | end |
| 83 | 85 | |
| 84 | 86 | defmodule TransitRealtime.TripDescriptor.ScheduleRelationship do |
modified
apps/room_gtfs/lib/room_gtfs/gtfs_worker.ex
+14
−4
@@ -36,7 +36,7 @@ defmodule RoomGtfs.Worker do
| 36 | 36 | def get_current_realtime(name, trips, stop) do |
| 37 | 37 | "gtfs#{name}" |
| 38 | 38 | |> via_tuple |
| 39 | − |> GenServer.call({:query_realtime, trips, stop}) | |
| 39 | + |> GenServer.call({:query_realtime, trips, stop}, 30_000) | |
| 40 | 40 | end |
| 41 | 41 | |
| 42 | 42 | def query_stop(id, query) do |
@@ -121,7 +121,15 @@ defmodule RoomGtfs.Worker do
| 121 | 121 | end |
| 122 | 122 | |
| 123 | 123 | def handle_call({:query_realtime, trips, stop}, _from, state) do |
| 124 | − r = GenServer.call(state.child_rt, {:query_realtime, trips, stop}) | |
| 124 | + r = | |
| 125 | + try do | |
| 126 | + GenServer.call(state.child_rt, {:query_realtime, trips, stop}) | |
| 127 | + catch | |
| 128 | + :exit, _ -> IO.puts "timeout? exit" | |
| 129 | + [] | |
| 130 | + after | |
| 131 | + [] | |
| 132 | + end | |
| 125 | 133 | {:reply, r, state} |
| 126 | 134 | end |
| 127 | 135 |
@@ -136,6 +144,8 @@ defmodule RoomGtfs.Worker.RT do
| 136 | 144 | use GenServer |
| 137 | 145 | @registry :zeus |
| 138 | 146 | |
| 147 | + require Logger | |
| 148 | + | |
| 139 | 149 | alias RoomSanctum.Configuration |
| 140 | 150 | alias RoomSanctum.Storage |
| 141 | 151 | alias RoomSanctum.Repo |
@@ -215,7 +225,7 @@ defmodule RoomGtfs.Worker.RT do
| 215 | 225 | val -> |
| 216 | 226 | case fetch_rt_url(val) do |
| 217 | 227 | {:ok, data_tu} -> state |> Map.put(:rt_tu, data_tu) |
| 218 | − {:error, _error} -> | |
| 228 | + {:error, error} -> | |
| 219 | 229 | Logger.info("failed to fetch gtfs-rt url[tu] for '#{state.inst.name}', reason: #{error.reason}") |
| 220 | 230 | state |
| 221 | 231 | end |
@@ -229,7 +239,7 @@ defmodule RoomGtfs.Worker.RT do
| 229 | 239 | val -> |
| 230 | 240 | case fetch_rt_url(val) do |
| 231 | 241 | {:ok, data_vp} -> state |> Map.put(:rt_vp, data_vp) |
| 232 | − {:error, _error} -> | |
| 242 | + {:error, error} -> | |
| 233 | 243 | Logger.info("failed to fetch gtfs-rt url[vp] for '#{state.inst.name}', reason: #{error.reason}") |
| 234 | 244 | state |
| 235 | 245 | end |
modified
apps/room_sanctum/priv/repo/migrations/20220625050942_create_focis.exs
+1
−0
@@ -6,6 +6,7 @@ defmodule RoomSanctum.Repo.Migrations.CreateFocis do
| 6 | 6 | add :name, :string |
| 7 | 7 | add :place, :geometry |
| 8 | 8 | add :user_id, references(:users, on_delete: :nilify_all), null: false |
| 9 | + add :query_ids, {:array, :integer} | |
| 9 | 10 | |
| 10 | 11 | timestamps() |
| 11 | 12 | end |
Parents: 3827b8d