|
@@ -7,6 +7,8 @@ const { setTimeout } = require('node:timers/promises')
|
|
|
// make sure all `allMismatchReasons` are displayed in the output
|
|
// make sure all `allMismatchReasons` are displayed in the output
|
|
|
const util = require('util')
|
|
const util = require('util')
|
|
|
const pLimit = require('p-limit')
|
|
const pLimit = require('p-limit')
|
|
|
|
|
+const { waitForDb } = require('../../app/src/infrastructure/mongodb')
|
|
|
|
|
+
|
|
|
util.inspect.defaultOptions.maxArrayLength = null
|
|
util.inspect.defaultOptions.maxArrayLength = null
|
|
|
|
|
|
|
|
const ScriptLogger = {
|
|
const ScriptLogger = {
|
|
@@ -144,6 +146,8 @@ const loopForSubscriptions = async skipInitial => {
|
|
|
|
|
|
|
|
let retryCounter = 0
|
|
let retryCounter = 0
|
|
|
const run = async () => {
|
|
const run = async () => {
|
|
|
|
|
+ await waitForDb()
|
|
|
|
|
+
|
|
|
while (true) {
|
|
while (true) {
|
|
|
try {
|
|
try {
|
|
|
await loopForSubscriptions(
|
|
await loopForSubscriptions(
|