mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add waitForDb
in scripts/resync_subscriptions.js (#19154)
GitOrigin-RevId: 608bce2654d2b6dbeb662ad0da8bb5c5ce3d68f3
This commit is contained in:
parent
01188589f8
commit
ebec84540f
1 changed files with 4 additions and 0 deletions
|
@ -7,6 +7,8 @@ const { setTimeout } = require('node:timers/promises')
|
|||
// make sure all `allMismatchReasons` are displayed in the output
|
||||
const util = require('util')
|
||||
const pLimit = require('p-limit')
|
||||
const { waitForDb } = require('../../app/src/infrastructure/mongodb')
|
||||
|
||||
util.inspect.defaultOptions.maxArrayLength = null
|
||||
|
||||
const ScriptLogger = {
|
||||
|
@ -144,6 +146,8 @@ const loopForSubscriptions = async skipInitial => {
|
|||
|
||||
let retryCounter = 0
|
||||
const run = async () => {
|
||||
await waitForDb()
|
||||
|
||||
while (true) {
|
||||
try {
|
||||
await loopForSubscriptions(
|
||||
|
|
Loading…
Reference in a new issue