Improvements in collection storage. Breaks compatibility with previous versions!

This commit is contained in:
Fabian Stamm
2019-11-04 17:52:18 +01:00
parent 9f944549b6
commit aa2a846031
8 changed files with 131 additions and 56 deletions

View File

@ -3,6 +3,10 @@ export type Release = { release: () => void };
export default class DocumentLock {
private locks = new Map<string, (() => void)[]>();
getLocks() {
return Array.from(this.locks.keys())
}
async lock(collection: string = "", document: string = "") {
let key = collection + "/" + document;
let l = this.locks.get(key);