Skip to content

Commit 5cdf6d5

Browse files
committed
chore: basic agent service formatting
1 parent ecc8a11 commit 5cdf6d5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

api/src/agent/agent.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,12 @@ export class HermesAgentService implements OnModuleInit {
305305
if (pending.length === 0) {
306306
return;
307307
}
308+
308309
const batch = pending.splice(0, pending.length);
309310
const rows = eventInsertRows(runId, batch, seq);
311+
310312
seq += batch.length;
313+
311314
chain = chain.then(() =>
312315
this.prisma.agentEvent.createMany({ data: rows }).then(
313316
() => undefined,
@@ -319,6 +322,7 @@ export class HermesAgentService implements OnModuleInit {
319322

320323
const subscription = this.langfuse.observe(runId).subscribe((ev) => pending.push(ev));
321324
const timer = setInterval(flush, EVENT_FLUSH_INTERVAL_MS);
325+
322326
timer.unref?.(); // never hold the process open on this timer alone
323327

324328
return {

0 commit comments

Comments
 (0)