security hardening + drafts/attachments
This commit is contained in:
20
worker/src/worker.js
Normal file
20
worker/src/worker.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'dotenv/config';
|
||||
import pg from 'pg';
|
||||
|
||||
const { Pool } = pg;
|
||||
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
|
||||
|
||||
// Placeholder worker loop
|
||||
async function main() {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Mastermind worker started');
|
||||
while (true) {
|
||||
await new Promise((r) => setTimeout(r, 10_000));
|
||||
// future: ingest inbox, OCR docs, classify
|
||||
}
|
||||
}
|
||||
|
||||
main().catch((e) => {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user