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

This reverts commit 4868f6e611.
This commit is contained in:
forehalo
2024-07-19 11:31:01 +08:00
parent 585003640f
commit 90c00b6db9
11 changed files with 70 additions and 182 deletions
@@ -3,13 +3,9 @@ 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,6 +9,9 @@ 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 }) =>