metricity icon indicating copy to clipboard operation
metricity copied to clipboard

Messages backfill

Open jchristgit opened this issue 1 year ago • 0 comments

At the moment no messages are inserted for the time when metricity is not available, rendering statistics during that time empty.

It would be nice if metricity could backfill this data on startup. For example, we could check something like SELECT channel_id, max(id::int) FROM messages GROUP BY channel_id, iterate over the history of each channel using after=message_id, and then insert any messages. From my understanding duplicate inserts should mostly be a no-op (possibly needing a ON CONFLICT DO IGNORE).

jchristgit avatar Jun 18 '24 19:06 jchristgit