mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-27 00:10:49 +00:00
5714deaa08
[docstore] skip mongo/object-persistor calls when archiving is disabled GitOrigin-RevId: 71bb7d77e987d6f32e37fd888311b6cc2a461170
12 lines
437 B
JavaScript
12 lines
437 B
JavaScript
const settings = require('@overleaf/settings')
|
|
|
|
const persistorSettings = settings.docstore
|
|
persistorSettings.Metrics = require('@overleaf/metrics')
|
|
|
|
const ObjectPersistor = require('@overleaf/object-persistor')
|
|
const AbstractPersistor = require('@overleaf/object-persistor/src/AbstractPersistor')
|
|
const persistor = settings.docstore.backend
|
|
? ObjectPersistor(persistorSettings)
|
|
: new AbstractPersistor()
|
|
|
|
module.exports = persistor
|