mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Merge pull request #17925 from overleaf/jpa-ac-20s-timeout-migration-logging-tweaks
[web] timeout 20s split-test teardown cleanups (remove override, remove tests, ...) GitOrigin-RevId: 8d8c44539cf45d0f5142f84cf8372cecda3bf77a
This commit is contained in:
@@ -13,20 +13,22 @@ async function logCount() {
|
||||
{ 'features.compileTimeout': { $lte: 60, $ne: 20 } },
|
||||
{ readPreference: READ_PREFERENCE_SECONDARY }
|
||||
)
|
||||
console.log(`Found ${count60s} users with compileTimeout <= 60s && != 20s`)
|
||||
const count20s = await db.users.countDocuments(
|
||||
{ 'features.compileTimeout': 20 },
|
||||
{ readPreference: READ_PREFERENCE_SECONDARY }
|
||||
)
|
||||
console.log(`Found ${count60s} users with compileTimeout <= 60s && != 20s`)
|
||||
console.log(`Found ${count20s} users with compileTimeout == 20s`)
|
||||
}
|
||||
|
||||
const main = async ({ COMMIT }) => {
|
||||
const main = async ({ COMMIT, SKIP_COUNT }) => {
|
||||
console.time('Script Duration')
|
||||
|
||||
await waitForDb()
|
||||
|
||||
await logCount()
|
||||
if (!SKIP_COUNT) {
|
||||
await logCount()
|
||||
}
|
||||
|
||||
if (COMMIT) {
|
||||
const nModified = await batchedUpdate(
|
||||
@@ -43,10 +45,11 @@ const main = async ({ COMMIT }) => {
|
||||
const setup = () => {
|
||||
const argv = minimist(process.argv.slice(2))
|
||||
const COMMIT = argv.commit !== undefined
|
||||
const SKIP_COUNT = argv['skip-count'] !== undefined
|
||||
if (!COMMIT) {
|
||||
console.warn('Doing dry run. Add --commit to commit changes')
|
||||
}
|
||||
return { COMMIT }
|
||||
return { COMMIT, SKIP_COUNT }
|
||||
}
|
||||
|
||||
main(setup())
|
||||
|
||||
Reference in New Issue
Block a user