Through the book to Chapter 15 and all has worked, until now. I can't save "orders" to the data_warehouse db. So, I started with cleaning the DBs out, recreating, remigrating (and reseeding the events from the XRP history file). Now I get
iex(1)> Naive.start_trading("xrpusdt")
11:50:54.299 [info] Starting Elixir.Naive.SymbolSupervisor worker for XRPUSDT
** (FunctionClauseError) no function clause matching in Ecto.Changeset.change/2
The following arguments were given to Ecto.Changeset.change/2:
# 1
nil
# 2
%{status: "on"}
Attempted function clauses (showing 4 out of 4):
def change({data, types}, changes) when is_map(data)
def change(%Ecto.Changeset{types: nil}, _changes)
def change(%Ecto.Changeset{changes: changes, types: types} = changeset, new_changes) when is_map(new_changes) or is_list(new_changes)
def change(%{__struct__: struct} = data, changes) when is_map(changes) or is_list(changes)
(ecto 3.5.8) lib/ecto/changeset.ex:376: Ecto.Changeset.change/2
(core 0.1.0) lib/core/service_supervisor.ex:110: Core.ServiceSupervisor.update_status/4
(core 0.1.0) lib/core/service_supervisor.ex:77: Core.ServiceSupervisor.start_worker/5
Obviously there is nothing in the DB, so no status to update. But for some reason I thought there was a step to get all the symbols from Binance, and load that out. But can't find it for the life of me. Anyway, that wouldn't solve the problem because XRP isn't there anymore.
Any ideas on how to optimally handle this from the ServiceSupervisor? Since we're abstracted out to the scheme, maybe to an upsert?
Through the book to Chapter 15 and all has worked, until now. I can't save "orders" to the data_warehouse db. So, I started with cleaning the DBs out, recreating, remigrating (and reseeding the events from the XRP history file). Now I get
Obviously there is nothing in the DB, so no status to update. But for some reason I thought there was a step to get all the symbols from Binance, and load that out. But can't find it for the life of me. Anyway, that wouldn't solve the problem because XRP isn't there anymore.
Any ideas on how to optimally handle this from the ServiceSupervisor? Since we're abstracted out to the scheme, maybe to an
upsert
?