discourse-ai/lib/modules/embeddings
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
..
jobs/regular FIX: Use correct variable and method for embeddings (#35) 2023-03-31 16:15:10 -03:00
entry_point.rb DEV: Resolve add_to_serializer deprecations (#46) 2023-04-24 16:07:17 +01:00
model.rb FIX: Non instructor OSS embeddings was broken (#65) 2023-05-17 12:10:10 -03:00
semantic_related.rb FIX: ensure we only attempt embedding once every 15 minutes (#76) 2023-05-23 10:43:24 +10:00
semantic_search.rb FEATURE: Semantic assymetric full-page search (#34) 2023-03-31 15:29:56 -03:00
topic.rb FIX: Ensure embeddings database outages are handled gracefully (#80) 2023-05-23 22:57:52 +01:00