mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-11 09:48:27 +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>
38 lines
1.0 KiB
TypeScript
38 lines
1.0 KiB
TypeScript
import { queue, task } from "@trigger.dev/sdk";
|
|
import {
|
|
processEpisodeIngestion,
|
|
IngestBodyRequest,
|
|
type IngestEpisodePayload,
|
|
} from "~/jobs/ingest/ingest-episode.logic";
|
|
import { triggerSpaceAssignment } from "../spaces/space-assignment";
|
|
import { triggerSessionCompaction } from "../session/session-compaction";
|
|
|
|
const ingestionQueue = queue({
|
|
name: "ingestion-queue",
|
|
concurrencyLimit: 1,
|
|
});
|
|
|
|
// Export for backwards compatibility
|
|
export { IngestBodyRequest };
|
|
|
|
// Register the Trigger.dev task
|
|
export const ingestTask = task({
|
|
id: "ingest-episode",
|
|
queue: ingestionQueue,
|
|
machine: "medium-2x",
|
|
run: async (payload: IngestEpisodePayload) => {
|
|
// Use common logic with Trigger-specific callbacks for follow-up jobs
|
|
return await processEpisodeIngestion(
|
|
payload,
|
|
// Callback for space assignment
|
|
async (params) => {
|
|
await triggerSpaceAssignment(params);
|
|
},
|
|
// Callback for session compaction
|
|
async (params) => {
|
|
await triggerSessionCompaction(params);
|
|
},
|
|
);
|
|
},
|
|
});
|