mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-10 23:58:28 +00:00
* feat: remove trigger and run base on bullmq * fix: telemetry and trigger deploymen * feat: add Ollama container and update ingestion status for unchanged documents * feat: add logger to bullmq workers * 1. Remove chat and deep-search from trigger 2. Add ai/sdk for chat UI 3. Added a better model manager * refactor: simplify clustered graph query and add stop conditions for AI responses * fix: streaming * fix: docker docs --------- Co-authored-by: Manoj <saimanoj58@gmail.com>
95 lines
1.9 KiB
TypeScript
95 lines
1.9 KiB
TypeScript
/**
|
|
* BullMQ Queues
|
|
*
|
|
* All queue definitions for the BullMQ implementation
|
|
*/
|
|
|
|
import { Queue } from "bullmq";
|
|
import { getRedisConnection } from "../connection";
|
|
|
|
/**
|
|
* Episode ingestion queue
|
|
* Handles individual episode ingestion (including document chunks)
|
|
*/
|
|
export const ingestQueue = new Queue("ingest-queue", {
|
|
connection: getRedisConnection(),
|
|
defaultJobOptions: {
|
|
attempts: 3,
|
|
backoff: {
|
|
type: "exponential",
|
|
delay: 2000,
|
|
},
|
|
removeOnComplete: {
|
|
age: 3600, // Keep completed jobs for 1 hour
|
|
count: 1000, // Keep last 1000 completed jobs
|
|
},
|
|
removeOnFail: {
|
|
age: 86400, // Keep failed jobs for 24 hours
|
|
},
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Document ingestion queue
|
|
* Handles document-level ingestion with differential processing
|
|
*/
|
|
export const documentIngestQueue = new Queue("document-ingest-queue", {
|
|
connection: getRedisConnection(),
|
|
defaultJobOptions: {
|
|
attempts: 3,
|
|
backoff: {
|
|
type: "exponential",
|
|
delay: 2000,
|
|
},
|
|
removeOnComplete: {
|
|
age: 3600,
|
|
count: 1000,
|
|
},
|
|
removeOnFail: {
|
|
age: 86400,
|
|
},
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Conversation title creation queue
|
|
*/
|
|
export const conversationTitleQueue = new Queue("conversation-title-queue", {
|
|
connection: getRedisConnection(),
|
|
defaultJobOptions: {
|
|
attempts: 3,
|
|
backoff: {
|
|
type: "exponential",
|
|
delay: 2000,
|
|
},
|
|
removeOnComplete: {
|
|
age: 3600,
|
|
count: 1000,
|
|
},
|
|
removeOnFail: {
|
|
age: 86400,
|
|
},
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Session compaction queue
|
|
*/
|
|
export const sessionCompactionQueue = new Queue("session-compaction-queue", {
|
|
connection: getRedisConnection(),
|
|
defaultJobOptions: {
|
|
attempts: 3,
|
|
backoff: {
|
|
type: "exponential",
|
|
delay: 2000,
|
|
},
|
|
removeOnComplete: {
|
|
age: 3600,
|
|
count: 1000,
|
|
},
|
|
removeOnFail: {
|
|
age: 86400,
|
|
},
|
|
},
|
|
});
|