mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
docstrings, moment import, fix log format
This commit is contained in:
parent
95b8134614
commit
5f9ecdcfe4
@ -1,4 +1,4 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment-timezone';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output an ISO8601 format datetime string, with timezone.
|
* Output an ISO8601 format datetime string, with timezone.
|
||||||
|
@ -2505,7 +2505,8 @@ export class ActiveDoc extends EventEmitter {
|
|||||||
snapshotProgress.lastWindowDoneAt : Date.now();
|
snapshotProgress.lastWindowDoneAt : Date.now();
|
||||||
const delay = snapshotProgress.lastWindowStartedAt ?
|
const delay = snapshotProgress.lastWindowStartedAt ?
|
||||||
lastWindowTime - snapshotProgress.lastWindowStartedAt : null;
|
lastWindowTime - snapshotProgress.lastWindowStartedAt : null;
|
||||||
this._log.debug(docSession, 'snapshot status', {
|
log.rawInfo('snapshot status', {
|
||||||
|
...this.getLogMeta(docSession),
|
||||||
...snapshotProgress,
|
...snapshotProgress,
|
||||||
lastChangeAt: normalizedDateTimeString(snapshotProgress.lastChangeAt),
|
lastChangeAt: normalizedDateTimeString(snapshotProgress.lastChangeAt),
|
||||||
lastWindowStartedAt: normalizedDateTimeString(snapshotProgress.lastWindowStartedAt),
|
lastWindowStartedAt: normalizedDateTimeString(snapshotProgress.lastWindowStartedAt),
|
||||||
|
@ -79,34 +79,40 @@ export class TrivialDocStorageManager implements IDocStorageManager {
|
|||||||
* All information is within the lifetime of a doc worker, not global.
|
* All information is within the lifetime of a doc worker, not global.
|
||||||
*/
|
*/
|
||||||
export interface SnapshotProgress {
|
export interface SnapshotProgress {
|
||||||
// The last time the document was marked as having changed.
|
/** The last time the document was marked as having changed. */
|
||||||
lastChangeAt?: number;
|
lastChangeAt?: number;
|
||||||
|
|
||||||
// The last time a save window started for the document (checking to see
|
/**
|
||||||
// if it needs to be pushed, and pushing it if so, possibly waiting
|
* The last time a save window started for the document (checking to see
|
||||||
// quite some time to bundle any other changes).
|
* if it needs to be pushed, and pushing it if so, possibly waiting
|
||||||
|
* quite some time to bundle any other changes).
|
||||||
|
*/
|
||||||
lastWindowStartedAt?: number;
|
lastWindowStartedAt?: number;
|
||||||
|
|
||||||
// The last time the document was either pushed or determined to not
|
/**
|
||||||
// actually need to be pushed, after having been marked as changed.
|
* The last time the document was either pushed or determined to not
|
||||||
|
* actually need to be pushed, after having been marked as changed.
|
||||||
|
*/
|
||||||
lastWindowDoneAt?: number;
|
lastWindowDoneAt?: number;
|
||||||
|
|
||||||
// Number of times the document was pushed.
|
/** Number of times the document was pushed. */
|
||||||
pushes: number;
|
pushes: number;
|
||||||
|
|
||||||
// Number of times the document was not pushed because no change found.
|
/** Number of times the document was not pushed because no change found. */
|
||||||
skippedPushes: number;
|
skippedPushes: number;
|
||||||
|
|
||||||
// Number of times there was an error trying to push.
|
/** Number of times there was an error trying to push. */
|
||||||
errors: number;
|
errors: number;
|
||||||
|
|
||||||
// Number of times the document was marked as changed.
|
/**
|
||||||
// Will generally be a lot greater than saves.
|
* Number of times the document was marked as changed.
|
||||||
|
* Will generally be a lot greater than saves.
|
||||||
|
*/
|
||||||
changes: number;
|
changes: number;
|
||||||
|
|
||||||
// Number of times a save window was started.
|
/** Number of times a save window was started. */
|
||||||
windowsStarted: number;
|
windowsStarted: number;
|
||||||
|
|
||||||
// Number of times a save window was completed.
|
/** Number of times a save window was completed. */
|
||||||
windowsDone: number;
|
windowsDone: number;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user