Unified · Split
| @@ -144,21 +144,19 @@ export async function runQueuedTask( · 143 unmodified lines | ||
| 144 | 144 | }; |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | − const runtimeResult = await (async () => { | |
| 148 | − const adapter = new InProcessExecutionAdapter({ | |
| 149 | − runId: args.taskId, | |
| 150 | − invokeTool: async (call) => await invokeTool(ctx, running, call), | |
| 151 | − }); | |
| 147 | + const adapter = new InProcessExecutionAdapter({ | |
| 148 | + runId: args.taskId, | |
| 149 | + invokeTool: async (call) => await invokeTool(ctx, running, call), | |
| 150 | + }); | |
| 152 | 151 | |
| 153 | − return await runCodeWithAdapter( | |
| 154 | − { | |
| 155 | − taskId: args.taskId, | |
| 156 | − code: running.code, | |
| 157 | − timeoutMs: running.timeoutMs, | |
| 158 | − }, | |
| 159 | − adapter, | |
| 160 | − ); | |
| 161 | − })(); | |
| 152 | + const runtimeResult = await runCodeWithAdapter( | |
| 153 | + { | |
| 154 | + taskId: args.taskId, | |
| 155 | + code: running.code, | |
| 156 | + timeoutMs: running.timeoutMs, | |
| 157 | + }, | |
| 158 | + adapter, | |
| 159 | + ); | |
| 162 | 160 | |
| 163 | 161 | const finished = await markTaskFinished(ctx, { |
| 164 | 162 | taskId: args.taskId, |