UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 688 B
import{o as resolveGlobalSingleton}from"./global-singleton-DolL9xGt.mjs";import{o as resolveRuntimeProcessEntrypointUrl}from"./runtime-process-url-DJ272Tuo.mjs";import{t as WorkerTaskPool}from"./worker-task-pool-Bg54sSAN.mjs"; //!src/logging/logger-file-worker.ts async function runFileLogIOInWorker(e,t){const n=resolveGlobalSingleton(Symbol.for(`openclaw.fileLogWorker`),()=>({}),async e=>{await t();await e.pool?.close();e.pool=void 0});return await(n.pool??=new WorkerTaskPool({workerUrl:resolveRuntimeProcessEntrypointUrl(`fileLog`),workerClass:`writer`})).run(e,{inputBytes:Buffer.byteLength(e.file)+(e.type===`append`?Buffer.byteLength(e.payload):0)})}export{runFileLogIOInWorker};