File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
apps/sim/app/api/workflows/[id]/execute Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -596,6 +596,8 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id:
596596 }
597597 }
598598
599+ const shouldCleanupBase64 = true
600+
599601 try {
600602 const startTime = new Date ( )
601603
@@ -866,9 +868,6 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id:
866868 endTime : result . metadata ?. endTime || new Date ( ) . toISOString ( ) ,
867869 } ,
868870 } )
869-
870- // Cleanup base64 cache for this execution
871- await cleanupExecutionBase64Cache ( executionId )
872871 } catch ( error : unknown ) {
873872 const isTimeout = isTimeoutError ( error ) || timeoutController . isTimedOut ( )
874873 const errorMessage = isTimeout
@@ -902,6 +901,9 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id:
902901 } )
903902 } finally {
904903 timeoutController . cleanup ( )
904+ if ( executionId && shouldCleanupBase64 ) {
905+ await cleanupExecutionBase64Cache ( executionId )
906+ }
905907 if ( ! isStreamClosed ) {
906908 try {
907909 controller . enqueue ( encoder . encode ( 'data: [DONE]\n\n' ) )
You can’t perform that action at this time.
0 commit comments