feat(api): 开发auth、login等接口,规范格式化

This commit is contained in:
R524809
2026-09-03 13:11:06 +08:00
parent 195b6d25e9
commit 037928c778
82 changed files with 9199 additions and 5236 deletions
+11 -8
View File
@@ -3,22 +3,25 @@ import IORedis from 'ioredis';
// 显式构造客户端实例传给 BullMQ:原生 ESM(pnpm start)下 BullMQ 无法按 connection
// 选项自动加载 ioredis;maxRetriesPerRequest: null 是 BullMQ Worker 的要求
const connection = new IORedis(process.env.REDIS_URL ?? 'redis://localhost:6379', {
maxRetriesPerRequest: null,
});
const connection = new IORedis(
process.env.REDIS_URL ?? 'redis://localhost:6379',
{
maxRetriesPerRequest: null,
},
);
const dispatchQueue = new Queue('atlas-dispatch', { connection });
async function bootstrap() {
await dispatchQueue.waitUntilReady();
console.info(
'Atlas Worker is ready; it will consume transactional-outbox events after that module exists.',
);
await dispatchQueue.waitUntilReady();
console.info(
'Atlas Worker is ready; it will consume transactional-outbox events after that module exists.',
);
}
void bootstrap();
async function shutdown() {
await dispatchQueue.close();
await dispatchQueue.close();
}
process.once('SIGINT', () => void shutdown());