Sorry, missed this earlier. If it were me, I'd probably solve this on the DB side with `statement_t

Sorry, missed this earlier. If it were me, I'd probably solve this on the DB side with
statement_timeout
. Cut out all the interactions across the stack and just have queries get kiboshed if they run too long.

https://www.postgresql.org/docs/9.6/runtime-config-client.html
PostgreSQL Documentation
Was this page helpful?