Powered by AppSignal & Oban Pro

update eventcounts

update_eventcounts.livemd

update eventcounts

use QuickAlias, MyAppWeb
use QuickAlias, MyAppBe
use QuickAlias, MyApp

require Ecto.Query
require Ash.Query

Section

Location.get_rows_as_stream()
|> Stream.map(&Location.update_eventcount/1)
|> Stream.take(1_000_000)
|> Stream.run()
:ok
Agent.get_rows_as_stream()
|> Stream.map(&Agent.update_eventcount/1)
|> Stream.take(1_000_000)
|> Stream.run()
:ok