Skip to content

Instantly share code, notes, and snippets.

@BWheatie
Created January 30, 2019 20:49
Show Gist options
  • Save BWheatie/d0605d3271898b03a657cc7c70642106 to your computer and use it in GitHub Desktop.
Save BWheatie/d0605d3271898b03a657cc7c70642106 to your computer and use it in GitHub Desktop.
defmodule Viking.Core.Telemetry.Repeater.Tester do
def telemetry() do
now = NaiveDateTime.utc_now() |> NaiveDateTime.to_iso8601()
Viking.Core.Telemetry.Repeater.handle_info(
{:graphql_data, nil,
%{
data: %{
"observeTelemetryEvents" => %{
"vehicleId" => <CORE_ID>,
"points" => [
%{
"speed" => "9.51",
"location" => "{\"coordinates\":[-97.80178000000008,35.787470000000035],\"type\":\"Point\"}",
"timestamp" => now,
"measured_at" => now
}
]
}
}
}},
{<ORG_ID>, nil, nil,
%{<CORE_VEHILCE_ID> => <VIKING_VEHICLE_ID>}, true}
)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment