overleaf/services/docstore/app/js/PersistorManager.js
Jakob Ackermann 5714deaa08 Merge pull request #12986 from overleaf/jpa-docstore-archiving-disabled
[docstore] skip mongo/object-persistor calls when archiving is disabled

GitOrigin-RevId: 71bb7d77e987d6f32e37fd888311b6cc2a461170
2023-05-09 08:04:09 +00:00

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