Print pending id

This commit is contained in:
Andras Schmelczer 2025-05-23 21:57:41 +01:00
parent 0295b5633f
commit 0cd2e9175f
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
2 changed files with 7 additions and 2 deletions

View file

@ -138,7 +138,7 @@ export class SafeFileSystemOperations implements FileSystemOperations {
/**
* Decorate an operation to ensure that the file exists before running it.
* If the operation fails, it will check if the file still exists and throw
* a FileNotFoundError if it doesn't
* a FileNotFoundError if it doesn't.
*/
private async safeOperation<T>(
path: RelativePath,

View file

@ -128,12 +128,17 @@ export class Syncer {
const [promise, resolve, reject] = createPromise();
const id = uuidv4();
const document = this.database.createNewPendingDocument(
uuidv4(),
id,
relativePath,
promise
);
this.logger.debug(
`Creating new pending document ${relativePath} with id ${id}`
);
try {
await this.syncQueue.add(async () =>
this.internalSyncer.unrestrictedSyncLocallyCreatedFile(document)