task logs: migrate from filesystem to postgresql; refactor sidecars into submodules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 11:49:39 +00:00
co-authored by Claude Opus 4.6
parent 5129f7827f
commit d88fe3cac7
22 changed files with 621 additions and 545 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ import {
updateEmailAccountStatus,
} from 'officerdb';
import { validateImapConnection } from './imap-validate';
import * as sidecar from '../../sidecar-registry';
import { enqueueJob, listAllJobs } from '../../queue/init';
type CreateAccountBody = {
provider: string;
@@ -44,7 +44,7 @@ accountsRouter.get('/', async (ctx) => {
if (hasActiveAccounts) {
try {
const jobs = await sidecar.listJobs();
const jobs = await listAllJobs();
activeJobAccountIds = new Set(
jobs
.filter((j) => j.type === 'email-sync' && (j.status === 'queued' || j.status === 'running'))
@@ -148,7 +148,7 @@ accountsRouter.post('/:id/sync', async (ctx) => {
// Set status immediately so the UI reflects the queued state
await updateEmailAccountStatus(id, 'queued');
const job = await sidecar.enqueueJob({
const job = await enqueueJob({
lane: 'email',
type: 'email-sync',
userId: user.email,