Skip to content

Commit 074eb95

Browse files
committed
fix queue size check
1 parent f623cd2 commit 074eb95

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/import-categories.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ export async function importCategories(project, { filePath, logger }) {
101101
errors.push(ensureError(e))
102102
})
103103
}
104+
console.log('Waiting for icons to be created...')
104105

105106
await queue.onIdle()
107+
console.log('All icons created successfully.')
106108
if (errors.length > 0) {
107109
throw new AggregateError(
108110
errors,
@@ -188,6 +190,8 @@ export async function importCategories(project, { filePath, logger }) {
188190
const { buildDateValue, ...readerMetadata } = await reader.metadata()
189191
const fileVersion = await reader.fileVersion()
190192

193+
console.log('Waiting for translations to be created...')
194+
191195
for await (const {
192196
lang,
193197
translations: translationsByDocType,
@@ -235,7 +239,7 @@ export async function importCategories(project, { filePath, logger }) {
235239
// every iteration, we pause here when there are queued tasks (up to
236240
// DOCS_QUEUE_CONCURRENCY tasks could be pending however) to avoid
237241
// run-away memory usage.
238-
await queue.onSizeLessThan(0)
242+
await queue.onSizeLessThan(1)
239243
}
240244
}
241245
}

0 commit comments

Comments
 (0)