mirror of
https://github.com/standardnotes/server
synced 2026-10-14 03:13:45 -04:00
fix(revisions): add debug logs for retrieving revisions metadata from mysql
This commit is contained in:
@@ -177,6 +177,7 @@ export class ContainerConfigLoader {
|
||||
container.get(TYPES.ORMRevisionRepository),
|
||||
container.get(TYPES.RevisionMetadataPersistenceMapper),
|
||||
container.get(TYPES.RevisionPersistenceMapper),
|
||||
container.get(TYPES.Logger),
|
||||
),
|
||||
)
|
||||
if (env.get('S3_AWS_REGION', true)) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { MapperInterface, Uuid } from '@standardnotes/domain-core'
|
||||
import { Repository } from 'typeorm'
|
||||
import { Logger } from 'winston'
|
||||
|
||||
import { Revision } from '../../Domain/Revision/Revision'
|
||||
import { RevisionMetadata } from '../../Domain/Revision/RevisionMetadata'
|
||||
@@ -11,6 +12,7 @@ export class MySQLRevisionRepository implements RevisionRepositoryInterface {
|
||||
private ormRepository: Repository<TypeORMRevision>,
|
||||
private revisionMetadataMapper: MapperInterface<RevisionMetadata, TypeORMRevision>,
|
||||
private revisionMapper: MapperInterface<Revision, TypeORMRevision>,
|
||||
private logger: Logger,
|
||||
) {}
|
||||
|
||||
async updateUserUuid(itemUuid: Uuid, userUuid: Uuid): Promise<void> {
|
||||
@@ -94,6 +96,8 @@ export class MySQLRevisionRepository implements RevisionRepositoryInterface {
|
||||
|
||||
const simplifiedRevisions = await queryBuilder.getMany()
|
||||
|
||||
this.logger.debug(`Found ${simplifiedRevisions.length} revisions MySQL entries for item ${itemUuid.value}`)
|
||||
|
||||
const metadata = []
|
||||
for (const simplifiedRevision of simplifiedRevisions) {
|
||||
metadata.push(this.revisionMetadataMapper.toDomain(simplifiedRevision))
|
||||
|
||||
Reference in New Issue
Block a user