mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
fix(memory): await reader.cancel() and use non-blocking Bun.gc
This commit is contained in:
@@ -672,7 +672,7 @@ export class BlockExecutor {
|
||||
logger.error('Error reading executor stream for block', { blockId, error })
|
||||
} finally {
|
||||
try {
|
||||
reader.cancel().catch(() => {})
|
||||
await reader.cancel().catch(() => {})
|
||||
} catch {}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export function startMemoryTelemetry(intervalMs = 60_000) {
|
||||
| { gc?: (force: boolean) => void }
|
||||
| undefined
|
||||
if (typeof bunGlobal?.gc === 'function') {
|
||||
bunGlobal.gc(true)
|
||||
bunGlobal.gc(false)
|
||||
}
|
||||
|
||||
const mem = process.memoryUsage()
|
||||
|
||||
Reference in New Issue
Block a user