mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
improvement(redis-cleanup): schedule, async workflow, hitl base64 cache cleanup (#4646)
* improvement(redis-cleanup): schedule, async workflow, hitl bae64 cache cleanup * address comments
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
||||
import { preprocessExecution } from '@/lib/execution/preprocessing'
|
||||
import { LoggingSession } from '@/lib/logs/execution/logging-session'
|
||||
import { buildTraceSpans } from '@/lib/logs/execution/trace-spans/trace-spans'
|
||||
import { cleanupExecutionBase64Cache } from '@/lib/uploads/utils/user-file-base64.server'
|
||||
import {
|
||||
executeWorkflowCore,
|
||||
wasExecutionFinalizedByCore,
|
||||
@@ -348,6 +349,8 @@ async function runWorkflowExecution({
|
||||
})
|
||||
|
||||
throw error
|
||||
} finally {
|
||||
void cleanupExecutionBase64Cache(executionId)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import { createTimeoutAbortController, getTimeoutErrorMessage } from '@/lib/core
|
||||
import { preprocessExecution } from '@/lib/execution/preprocessing'
|
||||
import { LoggingSession } from '@/lib/logs/execution/logging-session'
|
||||
import { buildTraceSpans } from '@/lib/logs/execution/trace-spans/trace-spans'
|
||||
import { cleanupExecutionBase64Cache } from '@/lib/uploads/utils/user-file-base64.server'
|
||||
import {
|
||||
executeWorkflowCore,
|
||||
wasExecutionFinalizedByCore,
|
||||
@@ -196,6 +197,8 @@ export async function executeWorkflowJob(payload: WorkflowExecutionPayload) {
|
||||
})
|
||||
|
||||
throw error
|
||||
} finally {
|
||||
void cleanupExecutionBase64Cache(executionId)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
import { compactBlockLogs, compactExecutionPayload } from '@/lib/execution/payloads/serializer'
|
||||
import { preprocessExecution } from '@/lib/execution/preprocessing'
|
||||
import { LoggingSession } from '@/lib/logs/execution/logging-session'
|
||||
import { cleanupExecutionBase64Cache } from '@/lib/uploads/utils/user-file-base64.server'
|
||||
import { executeWorkflowCore } from '@/lib/workflows/executor/execution-core'
|
||||
import type { ExecutionEvent } from '@/lib/workflows/executor/execution-events'
|
||||
import { ExecutionSnapshot } from '@/executor/execution/snapshot'
|
||||
@@ -1363,6 +1364,7 @@ export class PauseResumeManager {
|
||||
})
|
||||
})
|
||||
}
|
||||
void cleanupExecutionBase64Cache(resumeExecutionId)
|
||||
}
|
||||
|
||||
if (executionError || !result) {
|
||||
|
||||
Reference in New Issue
Block a user