This commit is contained in:
parent
107e7d0b5a
commit
f629f4a019
3 changed files with 6 additions and 3 deletions
|
@ -23,7 +23,8 @@ defmodule WeewxProxy.HTTP.Ecowitt do
|
|||
sdr_keys = Sdr.recently_uploaded_keys(data.dateTime)
|
||||
_ = Logger.debug("Removing keys: `#{inspect(sdr_keys)}'")
|
||||
partial_data = Map.drop(data, sdr_keys)
|
||||
Publisher.publish("weewx/ingest_us", partial_data)
|
||||
:ok = Publisher.publish("weewx/ingest_us", partial_data)
|
||||
Publisher.publish_value_map("hadata/weewx/us", partial_data)
|
||||
else
|
||||
_ = Logger.error("Not publishing record because data appears invalid: #{inspect(data)}")
|
||||
:ok
|
||||
|
|
|
@ -136,7 +136,8 @@ defmodule WeewxProxy.HTTP.PurpleAir do
|
|||
}
|
||||
|
||||
_ = :ets.insert(:purpleair, {:last_update, transformed_data.dateTime})
|
||||
Publisher.publish("weewx/ingest_si", transformed_data)
|
||||
:ok = Publisher.publish("weewx/ingest_si", transformed_data)
|
||||
Publisher.publish_value_map("hadata/weewx/si", transformed_data)
|
||||
end
|
||||
|
||||
@spec format_date_time(parsed_body()) :: non_neg_integer()
|
||||
|
|
|
@ -141,7 +141,8 @@ defmodule WeewxProxy.Sdr.Ecowitt do
|
|||
partial_data = Map.drop(data, purpleair_keys)
|
||||
|
||||
true = :ets.insert(:sdr_ecowitt, {{type, :last_update}, data.dateTime})
|
||||
Publisher.publish("weewx/ingest_si", partial_data)
|
||||
:ok = Publisher.publish("weewx/ingest_si", partial_data)
|
||||
Publisher.publish_value_map("hadata/weewx/si", partial_data)
|
||||
else
|
||||
_ = Logger.error("Not publishing record because data appears invalid: #{inspect(data)}")
|
||||
:ok
|
||||
|
|
Loading…
Reference in a new issue