discourse-ai/lib
Rafael dos Santos Silva cfc6e388df
FIX: Ensure embeddings database outages are handled gracefully (#80)
The rails_failover middleware will intercept all `PG::ConnectionBad` errors and put the cluster into readonly mode. It does not have any handling for multiple databases. Therefore, an issue with the embeddings database was taking the whole cluster into readonly.

This commit fixes the issue by rescuing `PG::Error` from all AI database accesses, and re-raises errors with a different class. It also adds a spec to ensure that an embeddings database outage does not affect the functionality of the topics/show route.

Co-authored-by: David Taylor <david@taylorhq.com>
2023-05-23 22:57:52 +01:00
..
discourse_ai FEATURE: Composer AI helper (#8) 2023-03-15 17:02:20 -03:00
modules FIX: Ensure embeddings database outages are handled gracefully (#80) 2023-05-23 22:57:52 +01:00
shared FIX: Give up trying to reuse the DB connection and rely on pgbouncer (#79) 2023-05-23 15:12:59 -03:00
tasks/modules Fixes for embeddings and truncate (#67) 2023-05-18 09:21:28 +10:00