discourse-ai/app/jobs/regular
Sam cf220c530c
FIX: Improve MessageBus efficiency and correctly stop streaming (#1362)
* FIX: Improve MessageBus efficiency and correctly stop streaming

This commit enhances the message bus implementation for AI helper streaming by:

- Adding client_id targeting for message bus publications to ensure only the requesting client receives streaming updates
- Limiting MessageBus backlog size (2) and age (60 seconds) to prevent Redis bloat
- Replacing clearTimeout with Ember's cancel method for proper runloop management, we were leaking a stop
- Adding tests for client-specific message delivery

These changes improve memory usage and make streaming more reliable by ensuring messages are properly directed to the requesting client.

* composer suggestion needed a fix as well.

* backlog size of 2 is risky here cause same channel name is reused between clients
2025-05-23 16:23:06 +10:00
..
ai_spam_scan.rb FEATURE: Add AI-powered spam detection for new user posts (#1004) 2024-12-12 09:17:25 +11:00
create_ai_chat_reply.rb REFACTOR: Move personas into its own module. (#1233) 2025-03-31 14:42:33 -03:00
create_ai_reply.rb REFACTOR: Move personas into its own module. (#1233) 2025-03-31 14:42:33 -03:00
digest_rag_upload.rb FEATURE: Native PDF support (#1127) 2025-02-18 09:22:57 +11:00
fast_track_topic_gist.rb FIX: Make summaries backfill job more resilient. (#1071) 2025-01-16 09:42:53 -03:00
generate_chat_thread_title.rb DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00
generate_embeddings.rb DEV: Robust check for embeddings enabled (#1116) 2025-02-06 12:18:55 -03:00
generate_rag_embeddings.rb REFACTOR: Separation of concerns for embedding generation. (#1027) 2024-12-16 09:55:39 -03:00
manage_embedding_def_search_index.rb FEATURE: configurable embeddings (#1049) 2025-01-21 12:23:19 -03:00
post_sentiment_analysis.rb PERF: Move sentiment analysis to "low" sidekiq queue (#1173) 2025-03-07 14:12:15 +00:00
shared_conversation_adjust_upload_security.rb FIX: Secure/unsecure uploads when sharing AI conversations (#554) 2024-04-11 10:00:41 +10:00
stream_composer_helper.rb FIX: Improve MessageBus efficiency and correctly stop streaming (#1362) 2025-05-23 16:23:06 +10:00
stream_discord_reply.rb FEATURE: Configure persona backed features in admin panel (#1245) 2025-04-10 08:16:31 -07:00
stream_discover_reply.rb FEATURE: Personas powered summaries. (#1232) 2025-04-02 12:54:47 -03:00
stream_post_helper.rb FEATURE: Stream other post helper options (#745) 2024-08-08 11:32:39 -07:00
stream_topic_ai_summary.rb FEATURE: Make hot topic gists opt-in. (#846) 2024-10-21 15:15:25 -03:00