2014-02-12 05:40:42 -05:00
|
|
|
ALLDOCSKEY = "AllDocIds"
|
|
|
|
PROJECTKEY = "ProjectId"
|
|
|
|
BLOCKINGKEY = "Blocking"
|
|
|
|
CHANGEQUE = "ChangeQue"
|
|
|
|
DOCSINPROJECT = "DocsIn"
|
|
|
|
PENDINGUPDATESKEY = "PendingUpdates"
|
|
|
|
DOCLINES = "doclines"
|
|
|
|
DOCOPS = "DocOps"
|
|
|
|
DOCVERSION = "DocVersion"
|
|
|
|
DOCIDSWITHPENDINGUPDATES = "DocsWithPendingUpdates"
|
2014-02-24 11:37:45 -05:00
|
|
|
UNCOMPRESSED_HISTORY_OPS = "UncompressedHistoryOps"
|
2014-02-12 05:40:42 -05:00
|
|
|
|
|
|
|
module.exports =
|
|
|
|
|
|
|
|
allDocs : ALLDOCSKEY
|
|
|
|
docLines : (op)-> DOCLINES+":"+op.doc_id
|
|
|
|
docOps : (op)-> DOCOPS+":"+op.doc_id
|
2014-02-24 11:37:45 -05:00
|
|
|
uncompressedHistoryOp: (op) -> UNCOMPRESSED_HISTORY_OPS + ":" + op.doc_id
|
2014-02-12 05:40:42 -05:00
|
|
|
docVersion : (op)-> DOCVERSION+":"+op.doc_id
|
|
|
|
projectKey : (op)-> PROJECTKEY+":"+op.doc_id
|
|
|
|
blockingKey : (op)-> BLOCKINGKEY+":"+op.doc_id
|
|
|
|
changeQue : (op)-> CHANGEQUE+":"+op.project_id
|
|
|
|
docsInProject : (op)-> DOCSINPROJECT+":"+op.project_id
|
|
|
|
pendingUpdates : (op)-> PENDINGUPDATESKEY+":"+op.doc_id
|
|
|
|
docsWithPendingUpdates : DOCIDSWITHPENDINGUPDATES
|
|
|
|
combineProjectIdAndDocId: (project_id, doc_id) -> "#{project_id}:#{doc_id}"
|
|
|
|
splitProjectIdAndDocId: (project_and_doc_id) -> project_and_doc_id.split(":")
|
2014-02-28 14:09:29 -05:00
|
|
|
historyLoadManagerThreshold: "HistoryLoadManagerThreshold"
|
2014-02-12 05:40:42 -05:00
|
|
|
now : (key)->
|
|
|
|
d = new Date()
|
|
|
|
d.getDate()+":"+(d.getMonth()+1)+":"+d.getFullYear()+":"+key
|