fix(server): wrong usage of optl (#6714)

This commit is contained in:
forehalo
2024-07-17 08:17:13 +00:00
parent 08a0572d4e
commit 4868f6e611
11 changed files with 182 additions and 70 deletions
@@ -3,9 +3,13 @@ import '../prelude';
import { Logger } from '@nestjs/common';
import { CommandFactory } from 'nest-commander';
import { registerInstrumentations } from '../fundamentals/metrics';
async function bootstrap() {
AFFiNE.metrics.enabled = false;
AFFiNE.doc.manager.enableUpdateAutoMerging = false;
registerInstrumentations();
const { CliAppModule } = await import('./app');
await CommandFactory.run(CliAppModule, new Logger()).catch(e => {
console.error(e);
@@ -9,9 +9,6 @@ export class UnamedAccount1703756315970 {
const users = await db.$queryRaw<
User[]
>`SELECT * FROM users WHERE name ~ E'^[\\s\\u2000-\\u200F]*$';`;
console.log(
`renaming ${users.map(({ email }) => email).join('|')} users`
);
await Promise.all(
users.map(({ id, email }) =>