fix: Minor collab adjusts
This commit is contained in:
@ -50,7 +50,8 @@ export default class Tracing {
|
|||||||
|
|
||||||
Metrics.gaugePerInstance(
|
Metrics.gaugePerInstance(
|
||||||
"collaboration.documents_count",
|
"collaboration.documents_count",
|
||||||
instance.getDocumentsCount()
|
// -1 adjustment because hook is called before document is removed
|
||||||
|
instance.getDocumentsCount() - 1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,12 +10,10 @@ export default async function documentUpdater({
|
|||||||
documentId,
|
documentId,
|
||||||
ydoc,
|
ydoc,
|
||||||
userId,
|
userId,
|
||||||
done,
|
|
||||||
}: {
|
}: {
|
||||||
documentId: string,
|
documentId: string,
|
||||||
ydoc: Y.Doc,
|
ydoc: Y.Doc,
|
||||||
userId: string,
|
userId: string,
|
||||||
done?: boolean,
|
|
||||||
}) {
|
}) {
|
||||||
const document = await Document.findByPk(documentId);
|
const document = await Document.findByPk(documentId);
|
||||||
const state = Y.encodeStateAsUpdate(ydoc);
|
const state = Y.encodeStateAsUpdate(ydoc);
|
||||||
|
@ -19,7 +19,9 @@ export default class DebounceProcessor {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "documents.update.delayed": {
|
case "documents.update.delayed": {
|
||||||
const document = await Document.findByPk(event.documentId);
|
const document = await Document.findByPk(event.documentId, {
|
||||||
|
fields: ["updatedAt"],
|
||||||
|
});
|
||||||
|
|
||||||
// If the document has been deleted then prevent further processing
|
// If the document has been deleted then prevent further processing
|
||||||
if (!document) return;
|
if (!document) return;
|
||||||
|
@ -284,6 +284,7 @@
|
|||||||
"You can edit the name and other details at any time, however doing so often might confuse your team mates.": "You can edit the name and other details at any time, however doing so often might confuse your team mates.",
|
"You can edit the name and other details at any time, however doing so often might confuse your team mates.": "You can edit the name and other details at any time, however doing so often might confuse your team mates.",
|
||||||
"Name": "Name",
|
"Name": "Name",
|
||||||
"Alphabetical": "Alphabetical",
|
"Alphabetical": "Alphabetical",
|
||||||
|
"Sort": "Sort",
|
||||||
"Saving": "Saving",
|
"Saving": "Saving",
|
||||||
"Save": "Save",
|
"Save": "Save",
|
||||||
"Export started, you will receive an email when it’s complete.": "Export started, you will receive an email when it’s complete.",
|
"Export started, you will receive an email when it’s complete.": "Export started, you will receive an email when it’s complete.",
|
||||||
@ -350,6 +351,8 @@
|
|||||||
"Hide contents": "Hide contents",
|
"Hide contents": "Hide contents",
|
||||||
"Show contents": "Show contents",
|
"Show contents": "Show contents",
|
||||||
"Edit {{noun}}": "Edit {{noun}}",
|
"Edit {{noun}}": "Edit {{noun}}",
|
||||||
|
"Switch to dark": "Switch to dark",
|
||||||
|
"Switch to light": "Switch to light",
|
||||||
"Archived": "Archived",
|
"Archived": "Archived",
|
||||||
"Save Draft": "Save Draft",
|
"Save Draft": "Save Draft",
|
||||||
"Done Editing": "Done Editing",
|
"Done Editing": "Done Editing",
|
||||||
|
Reference in New Issue
Block a user