diff --git a/services/project-history/app/js/HistoryStoreManager.js b/services/project-history/app/js/HistoryStoreManager.js index 2960e3c8b9..9686840b9e 100644 --- a/services/project-history/app/js/HistoryStoreManager.js +++ b/services/project-history/app/js/HistoryStoreManager.js @@ -18,7 +18,7 @@ import * as LocalFileWriter from './LocalFileWriter.js' import * as HashManager from './HashManager.js' import * as HistoryBlobTranslator from './HistoryBlobTranslator.js' -const HTTP_REQUEST_TIMEOUT = Settings.apis.history_v1.requestTimeout +const HTTP_REQUEST_TIMEOUT = Settings.overleaf.history.requestTimeout /** * Container for functions that need to be mocked in tests diff --git a/services/project-history/config/settings.defaults.cjs b/services/project-history/config/settings.defaults.cjs index dd8855a806..97dc574f02 100644 --- a/services/project-history/config/settings.defaults.cjs +++ b/services/project-history/config/settings.defaults.cjs @@ -23,9 +23,6 @@ module.exports = { filestore: { url: `http://${process.env.FILESTORE_HOST || '127.0.0.1'}:3009`, }, - history_v1: { - requestTimeout: parseInt(process.env.V1_REQUEST_TIMEOUT || '300000', 10), - }, web: { url: `http://${ process.env.WEB_API_HOST || process.env.WEB_HOST || '127.0.0.1' @@ -90,6 +87,7 @@ module.exports = { retries_max: 30, interval: 2, }, + requestTimeout: parseInt(process.env.V1_REQUEST_TIMEOUT || '300000', 10), }, }, diff --git a/services/project-history/test/unit/js/HistoryStoreManager/HistoryStoreManagerTests.js b/services/project-history/test/unit/js/HistoryStoreManager/HistoryStoreManagerTests.js index b52c7dd13d..b6c79b7787 100644 --- a/services/project-history/test/unit/js/HistoryStoreManager/HistoryStoreManagerTests.js +++ b/services/project-history/test/unit/js/HistoryStoreManager/HistoryStoreManagerTests.js @@ -17,13 +17,13 @@ describe('HistoryStoreManager', function () { host: 'http://example.com', user: 'overleaf', pass: 'password', + requestTimeout: 123, }, }, apis: { filestore: { url: 'http://filestore.overleaf.production', }, - history_v1: { requestTimeout: 123 }, }, } this.latestChunkRequestArgs = sinon.match({