Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: remove integration queue cleanup (#12008)

Valery Meleshkinbc1bd8b3f41b
diff --git a/worker/src/features/mixpanel/handleMixpanelIntegrationSchedule.ts b/worker/src/features/mixpanel/handleMixpanelIntegrationSchedule.ts
index 162d10678f..8c5e875dd6 100644
--- a/worker/src/features/mixpanel/handleMixpanelIntegrationSchedule.ts
+++ b/worker/src/features/mixpanel/handleMixpanelIntegrationSchedule.ts
@@ -34,27 +34,6 @@ export const handleMixpanelIntegrationSchedule = async () => {
`[MIXPANEL] Scheduling ${mixpanelIntegrationProjects.length} Mixpanel integrations for sync`,
);
- // One-time migration: clean up jobs with the old hourly-key jobId format
- // (e.g. "<projectId>--2026-02-11T08") that may have accumulated.
- // Can be removed once all deployments have run this code.
- const hourlyKeyPattern = /\d{4}-\d{2}-\d{2}T\d{2}$/;
- const waitingJobs = await mixpanelIntegrationProcessingQueue.getWaiting(
- 0,
- 1000,
- );
- const failedJobs = await mixpanelIntegrationProcessingQueue.getFailed(
- 0,
- 1000,
- );
- const hasLegacyJobs = [...waitingJobs, ...failedJobs].some(
- (job) => job.id && hourlyKeyPattern.test(job.id),
- );
- if (hasLegacyJobs) {
- logger.info("[MIXPANEL] Cleaning up legacy hourly-key jobs");
- await mixpanelIntegrationProcessingQueue.drain();
- await mixpanelIntegrationProcessingQueue.clean(0, 1000, "failed");
- }
-
await mixpanelIntegrationProcessingQueue.addBulk(
mixpanelIntegrationProjects.map(
(integration: { projectId: string; lastSyncAt: Date | null }) => ({
diff --git a/worker/src/features/posthog/handlePostHogIntegrationSchedule.ts b/worker/src/features/posthog/handlePostHogIntegrationSchedule.ts
index 7a1ce4bf74..a014910e2c 100644
--- a/worker/src/features/posthog/handlePostHogIntegrationSchedule.ts
+++ b/worker/src/features/posthog/handlePostHogIntegrationSchedule.ts
@@ -32,24 +32,6 @@ export const handlePostHogIntegrationSchedule = async () => {
`[POSTHOG] Scheduling ${postHogIntegrationProjects.length} PostHog integrations for sync`,
);
- // One-time migration: clean up jobs with the old hourly-key jobId format
- // (e.g. "<projectId>--2026-02-11T08") that may have accumulated.
- // Can be removed once all deployments have run this code.
- const hourlyKeyPattern = /\d{4}-\d{2}-\d{2}T\d{2}$/;
- const waitingJobs = await postHogIntegrationProcessingQueue.getWaiting(
- 0,
- 1000,
- );
- const failedJobs = await postHogIntegrationProcessingQueue.getFailed(0, 1000);
- const hasLegacyJobs = [...waitingJobs, ...failedJobs].some(
- (job) => job.id && hourlyKeyPattern.test(job.id),
- );
- if (hasLegacyJobs) {
- logger.info("[POSTHOG] Cleaning up legacy hourly-key jobs");
- await postHogIntegrationProcessingQueue.drain();
- await postHogIntegrationProcessingQueue.clean(0, 1000, "failed");
- }
-
await postHogIntegrationProcessingQueue.addBulk(
postHogIntegrationProjects.map((integration) => ({
name: QueueJobs.PostHogIntegrationProcessingJob,