mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
[document-updater] add flag for checking sync state of a single project (#26433)
GitOrigin-RevId: 504f607c652e59fa1305067f273db849d7923da2
This commit is contained in:
@@ -15,6 +15,7 @@ const request = require('requestretry').defaults({
|
||||
retryDelay: 10,
|
||||
})
|
||||
|
||||
const ONLY_PROJECT_ID = process.env.ONLY_PROJECT_ID
|
||||
const AUTO_FIX_VERSION_MISMATCH =
|
||||
process.env.AUTO_FIX_VERSION_MISMATCH === 'true'
|
||||
const AUTO_FIX_PARTIALLY_DELETED_DOC_METADATA =
|
||||
@@ -319,10 +320,12 @@ async function processProject(projectId) {
|
||||
* @return {Promise<{perIterationOutOfSync: number, done: boolean}>}
|
||||
*/
|
||||
async function scanOnce(processed, outOfSync) {
|
||||
const projectIds = await ProjectFlusher.promises.flushAllProjects({
|
||||
limit: LIMIT,
|
||||
dryRun: true,
|
||||
})
|
||||
const projectIds = ONLY_PROJECT_ID
|
||||
? [ONLY_PROJECT_ID]
|
||||
: await ProjectFlusher.promises.flushAllProjects({
|
||||
limit: LIMIT,
|
||||
dryRun: true,
|
||||
})
|
||||
|
||||
let perIterationOutOfSync = 0
|
||||
for (const projectId of projectIds) {
|
||||
|
||||
Reference in New Issue
Block a user