where's the best place to run possibly long running queries on the DB after an insert / bulk insert?
I have a materialized view which I need to refresh when I either do a bulk load on a table via bulk_create, or an individual insert on it.
My initial idea would be to trigger an oban job via an after_action, but just want to clarify how this works for upserts etc.
2 Replies
Oban job would be the way IMO
right and after_action will work, just checked the tests 🙂