style: format merged scheduler and db changes

This commit is contained in:
Eyejoker
2026-03-20 03:48:48 +09:00
parent 6eb72ad499
commit f3283f0314
4 changed files with 18 additions and 12 deletions

View File

@@ -504,7 +504,6 @@ export class DiscordChannel implements Channel {
return groupType === this.agentTypeFilter;
}
async disconnect(): Promise<void> {
if (this.client) {
this.client.destroy();

View File

@@ -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']);
});
});

View File

@@ -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<Pick<ScheduledTask, 'status_message_id' | 'status_started_at'>>,
updates: Partial<
Pick<ScheduledTask, 'status_message_id' | 'status_started_at'>
>,
): void {
const fields: string[] = [];
const values: unknown[] = [];

View File

@@ -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');
}