mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 02:56:23 +08:00
fix(server): avoid repeatly register providers (#5265)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
Inject,
|
||||
Injectable,
|
||||
Logger,
|
||||
OnModuleDestroy,
|
||||
@@ -97,8 +96,6 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
|
||||
private busy = false;
|
||||
|
||||
constructor(
|
||||
@Inject('DOC_MANAGER_AUTOMATION')
|
||||
private readonly automation: boolean,
|
||||
private readonly db: PrismaService,
|
||||
private readonly config: Config,
|
||||
private readonly cache: Cache,
|
||||
@@ -106,7 +103,7 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
|
||||
) {}
|
||||
|
||||
onModuleInit() {
|
||||
if (this.automation) {
|
||||
if (this.config.doc.manager.enableUpdateAutoMerging) {
|
||||
this.logger.log('Use Database');
|
||||
this.setup();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user