Print pending id
This commit is contained in:
parent
0295b5633f
commit
0cd2e9175f
2 changed files with 7 additions and 2 deletions
|
|
@ -138,7 +138,7 @@ export class SafeFileSystemOperations implements FileSystemOperations {
|
||||||
/**
|
/**
|
||||||
* Decorate an operation to ensure that the file exists before running it.
|
* 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
|
* 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>(
|
private async safeOperation<T>(
|
||||||
path: RelativePath,
|
path: RelativePath,
|
||||||
|
|
|
||||||
|
|
@ -128,12 +128,17 @@ export class Syncer {
|
||||||
|
|
||||||
const [promise, resolve, reject] = createPromise();
|
const [promise, resolve, reject] = createPromise();
|
||||||
|
|
||||||
|
const id = uuidv4();
|
||||||
const document = this.database.createNewPendingDocument(
|
const document = this.database.createNewPendingDocument(
|
||||||
uuidv4(),
|
id,
|
||||||
relativePath,
|
relativePath,
|
||||||
promise
|
promise
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.logger.debug(
|
||||||
|
`Creating new pending document ${relativePath} with id ${id}`
|
||||||
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.syncQueue.add(async () =>
|
await this.syncQueue.add(async () =>
|
||||||
this.internalSyncer.unrestrictedSyncLocallyCreatedFile(document)
|
this.internalSyncer.unrestrictedSyncLocallyCreatedFile(document)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue