From f3283f03142c42099cd299a2e5ac11e2cdde0677 Mon Sep 17 00:00:00 2001 From: Eyejoker Date: Fri, 20 Mar 2026 03:48:48 +0900 Subject: [PATCH] style: format merged scheduler and db changes --- src/channels/discord.ts | 1 - src/db.test.ts | 4 +--- src/db.ts | 12 +++++++++--- src/task-scheduler.ts | 13 ++++++++----- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/channels/discord.ts b/src/channels/discord.ts index eda9e70..ec5f9c1 100644 --- a/src/channels/discord.ts +++ b/src/channels/discord.ts @@ -504,7 +504,6 @@ export class DiscordChannel implements Channel { return groupType === this.agentTypeFilter; } - async disconnect(): Promise { if (this.client) { this.client.destroy(); diff --git a/src/db.test.ts b/src/db.test.ts index 687f7be..e45f9c2 100644 --- a/src/db.test.ts +++ b/src/db.test.ts @@ -437,9 +437,7 @@ describe('task CRUD', () => { expect(getDueTasks('claude-code').map((task) => task.id)).toEqual([ 'task-claude', ]); - expect(getDueTasks('codex').map((task) => task.id)).toEqual([ - 'task-codex', - ]); + expect(getDueTasks('codex').map((task) => task.id)).toEqual(['task-codex']); }); }); diff --git a/src/db.ts b/src/db.ts index ae1657d..c36fc55 100644 --- a/src/db.ts +++ b/src/db.ts @@ -117,13 +117,17 @@ function createSchema(database: Database.Database): void { } try { - database.exec(`ALTER TABLE scheduled_tasks ADD COLUMN status_message_id TEXT`); + database.exec( + `ALTER TABLE scheduled_tasks ADD COLUMN status_message_id TEXT`, + ); } catch { /* column already exists */ } try { - database.exec(`ALTER TABLE scheduled_tasks ADD COLUMN status_started_at TEXT`); + database.exec( + `ALTER TABLE scheduled_tasks ADD COLUMN status_started_at TEXT`, + ); } catch { /* column already exists */ } @@ -637,7 +641,9 @@ export function updateTask( export function updateTaskStatusTracking( id: string, - updates: Partial>, + updates: Partial< + Pick + >, ): void { const fields: string[] = []; const values: unknown[] = []; diff --git a/src/task-scheduler.ts b/src/task-scheduler.ts index d7519d7..cb4a85f 100644 --- a/src/task-scheduler.ts +++ b/src/task-scheduler.ts @@ -124,7 +124,9 @@ export function renderWatchCiStatusMessage(args: { }): string { const target = extractWatchCiTarget(args.task.prompt) || 'CI watcher'; const title = - args.phase === 'completed' ? `CI 감시 종료: ${target}` : `CI 감시 중: ${target}`; + args.phase === 'completed' + ? `CI 감시 종료: ${target}` + : `CI 감시 중: ${target}`; const statusLabel = args.phase === 'checking' ? '확인 중' @@ -361,7 +363,10 @@ async function runTask( if (!currentTask) { await updateWatcherStatus('completed'); - logger.debug({ taskId: task.id }, 'Task deleted during execution, skipping persistence'); + logger.debug( + { taskId: task.id }, + 'Task deleted during execution, skipping persistence', + ); return; } @@ -402,9 +407,7 @@ export function startSchedulerLoop(deps: SchedulerDependencies): void { const loop = async () => { try { - const dueTasks = getDueTasks( - deps.serviceAgentType || SERVICE_AGENT_TYPE, - ); + const dueTasks = getDueTasks(deps.serviceAgentType || SERVICE_AGENT_TYPE); if (dueTasks.length > 0) { logger.info({ count: dueTasks.length }, 'Found due tasks'); }