mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Updating paths after core changed
Summary: Path for the HomeDbManager has beed updated after merging with core. Test Plan: Existing Reviewers: georgegevoian Reviewed By: georgegevoian Subscribers: georgegevoian Differential Revision: https://phab.getgrist.com/D4288
This commit is contained in:
parent
6171a012db
commit
b8c4b83a8c
@ -11,7 +11,7 @@ import * as gutil from 'app/common/gutil';
|
|||||||
import {Comm} from 'app/server/lib/Comm';
|
import {Comm} from 'app/server/lib/Comm';
|
||||||
import * as docUtils from 'app/server/lib/docUtils';
|
import * as docUtils from 'app/server/lib/docUtils';
|
||||||
import {GristServer} from 'app/server/lib/GristServer';
|
import {GristServer} from 'app/server/lib/GristServer';
|
||||||
import {IDocStorageManager, SnapshotProgress} from 'app/server/lib/IDocStorageManager';
|
import {EmptySnapshotProgress, IDocStorageManager, SnapshotProgress} from 'app/server/lib/IDocStorageManager';
|
||||||
import {IShell} from 'app/server/lib/IShell';
|
import {IShell} from 'app/server/lib/IShell';
|
||||||
import log from 'app/server/lib/log';
|
import log from 'app/server/lib/log';
|
||||||
import uuidv4 from "uuid/v4";
|
import uuidv4 from "uuid/v4";
|
||||||
@ -258,14 +258,7 @@ export class DocStorageManager implements IDocStorageManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getSnapshotProgress(): SnapshotProgress {
|
public getSnapshotProgress(): SnapshotProgress {
|
||||||
return {
|
return new EmptySnapshotProgress();
|
||||||
pushes: 0,
|
|
||||||
skippedPushes: 0,
|
|
||||||
errors: 0,
|
|
||||||
changes: 0,
|
|
||||||
windowsStarted: 0,
|
|
||||||
windowsDone: 0,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async replace(docName: string, options: any): Promise<void> {
|
public async replace(docName: string, options: any): Promise<void> {
|
||||||
|
@ -15,7 +15,7 @@ import {IDocWorkerMap} from 'app/server/lib/DocWorkerMap';
|
|||||||
import {ChecksummedExternalStorage, DELETED_TOKEN, ExternalStorage, Unchanged} from 'app/server/lib/ExternalStorage';
|
import {ChecksummedExternalStorage, DELETED_TOKEN, ExternalStorage, Unchanged} from 'app/server/lib/ExternalStorage';
|
||||||
import {HostedMetadataManager} from 'app/server/lib/HostedMetadataManager';
|
import {HostedMetadataManager} from 'app/server/lib/HostedMetadataManager';
|
||||||
import {ICreate} from 'app/server/lib/ICreate';
|
import {ICreate} from 'app/server/lib/ICreate';
|
||||||
import {IDocStorageManager, SnapshotProgress} from 'app/server/lib/IDocStorageManager';
|
import {EmptySnapshotProgress, IDocStorageManager, SnapshotProgress} from 'app/server/lib/IDocStorageManager';
|
||||||
import {LogMethods} from "app/server/lib/LogMethods";
|
import {LogMethods} from "app/server/lib/LogMethods";
|
||||||
import {fromCallback} from 'app/server/lib/serverUtils';
|
import {fromCallback} from 'app/server/lib/serverUtils';
|
||||||
import * as fse from 'fs-extra';
|
import * as fse from 'fs-extra';
|
||||||
@ -232,14 +232,7 @@ export class HostedStorageManager implements IDocStorageManager {
|
|||||||
public getSnapshotProgress(docName: string): SnapshotProgress {
|
public getSnapshotProgress(docName: string): SnapshotProgress {
|
||||||
let snapshotProgress = this._snapshotProgress.get(docName);
|
let snapshotProgress = this._snapshotProgress.get(docName);
|
||||||
if (!snapshotProgress) {
|
if (!snapshotProgress) {
|
||||||
snapshotProgress = {
|
snapshotProgress = new EmptySnapshotProgress();
|
||||||
pushes: 0,
|
|
||||||
skippedPushes: 0,
|
|
||||||
errors: 0,
|
|
||||||
changes: 0,
|
|
||||||
windowsStarted: 0,
|
|
||||||
windowsDone: 0,
|
|
||||||
};
|
|
||||||
this._snapshotProgress.set(docName, snapshotProgress);
|
this._snapshotProgress.set(docName, snapshotProgress);
|
||||||
}
|
}
|
||||||
return snapshotProgress;
|
return snapshotProgress;
|
||||||
|
@ -68,7 +68,7 @@ export class TrivialDocStorageManager implements IDocStorageManager {
|
|||||||
public async flushDoc() {}
|
public async flushDoc() {}
|
||||||
public async getSnapshots(): Promise<never> { throw new Error('no'); }
|
public async getSnapshots(): Promise<never> { throw new Error('no'); }
|
||||||
public async removeSnapshots(): Promise<never> { throw new Error('no'); }
|
public async removeSnapshots(): Promise<never> { throw new Error('no'); }
|
||||||
public getSnapshotProgress(): SnapshotProgress { throw new Error('no'); }
|
public getSnapshotProgress(): SnapshotProgress { return new EmptySnapshotProgress(); }
|
||||||
public async replace(): Promise<never> { throw new Error('no'); }
|
public async replace(): Promise<never> { throw new Error('no'); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,3 +116,12 @@ export interface SnapshotProgress {
|
|||||||
/** Number of times a save window was completed. */
|
/** Number of times a save window was completed. */
|
||||||
windowsDone: number;
|
windowsDone: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class EmptySnapshotProgress implements SnapshotProgress {
|
||||||
|
public pushes: number = 0;
|
||||||
|
public skippedPushes: number = 0;
|
||||||
|
public errors: number = 0;
|
||||||
|
public changes: number = 0;
|
||||||
|
public windowsStarted: number = 0;
|
||||||
|
public windowsDone: number = 0;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user