-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'monitoring-polling-system' of github.com:internxt/drive…
…-desktop into fix/ignore-nodes-with-same-name
- Loading branch information
Showing
31 changed files
with
451 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/apps/sync-engine/dependency-injection/boundaryBridge/BoundaryBridgeContainer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import { FileCreationOrchestrator } from '../../../../context/virtual-drive/boundaryBridge/application/FileCreationOrchestrator'; | ||
import { FileSyncOrchestrator } from '../../../../context/virtual-drive/boundaryBridge/application/FileSyncOrchestrator'; | ||
|
||
export interface BoundaryBridgeContainer { | ||
fileCreationOrchestrator: FileCreationOrchestrator; | ||
fileSyncOrchestrator: FileSyncOrchestrator; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/apps/sync-engine/dependency-injection/shared/SharedContainer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import { AbsolutePathToRelativeConverter } from '../../../../context/virtual-drive/shared/application/AbsolutePathToRelativeConverter'; | ||
import { PollingMonitorStart } from '../../../../context/virtual-drive/shared/application/PollingMonitorStart'; | ||
import { PollingMonitorStop } from '../../../../context/virtual-drive/shared/application/PollingMonitorStop'; | ||
import { RelativePathToAbsoluteConverter } from '../../../../context/virtual-drive/shared/application/RelativePathToAbsoluteConverter'; | ||
|
||
export interface SharedContainer { | ||
absolutePathToRelativeConverter: AbsolutePathToRelativeConverter; | ||
relativePathToAbsoluteConverter: RelativePathToAbsoluteConverter; | ||
pollingMonitorStart: PollingMonitorStart; | ||
pollingMonitorStop: PollingMonitorStop; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/context/virtual-drive/boundaryBridge/application/FileSyncOrchestrator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { RetryContentsUploader } from '../../contents/application/RetryContentsUploader'; | ||
import { FileSyncronizer } from '../../files/application/FileSyncronizer'; | ||
|
||
export class FileSyncOrchestrator { | ||
constructor( | ||
private readonly contentsUploader: RetryContentsUploader, | ||
private readonly fileSyncronizer: FileSyncronizer | ||
) {} | ||
|
||
run(absolutePaths: string[]): Promise<void[]> { | ||
return Promise.all( | ||
absolutePaths.map(async (absolutePath) => { | ||
await this.fileSyncronizer.run( | ||
absolutePath, | ||
this.contentsUploader.run.bind(this.contentsUploader) | ||
); | ||
}) | ||
); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/context/virtual-drive/files/application/FIlePlaceholderConverter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { File } from '../domain/File'; | ||
import { LocalFileSystem } from '../domain/file-systems/LocalFileSystem'; | ||
|
||
export class FilePlaceholderConverter { | ||
constructor(private readonly localFileSystem: LocalFileSystem) {} | ||
|
||
async run(file: File) { | ||
await this.localFileSystem.convertToPlaceholder(file); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/context/virtual-drive/files/application/FileContentsUpdater.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// import { FileRepository } from '../domain/FileRepository'; | ||
// import { RemoteFileSystem } from '../domain/file-systems/RemoteFileSystem'; | ||
|
||
// export class FileContentsUpdater { | ||
// constructor( | ||
// private readonly repository: FileRepository, | ||
// private readonly remote: RemoteFileSystem | ||
// ) {} | ||
|
||
// async run(file: File): Promise<void> { | ||
// await this.local.updateSyncStatus(file); | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/context/virtual-drive/files/application/FileSyncStatusUpdater.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { File } from '../domain/File'; | ||
import { LocalFileSystem } from '../domain/file-systems/LocalFileSystem'; | ||
|
||
export class FileSyncStatusUpdater { | ||
constructor(private readonly localFileSystem: LocalFileSystem) {} | ||
|
||
async run(file: File) { | ||
await this.localFileSystem.updateSyncStatus(file); | ||
} | ||
} |
Oops, something went wrong.