Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase lock duration and paginate in getBsdsIdentifiers #3246

Merged
merged 3 commits into from Apr 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions back/src/queue/producers/elastic.ts
Expand Up @@ -63,6 +63,13 @@ export const bulkIndexMasterQueue = new Queue<string>(
// 24h pour prendre de la marge, les jobs de cette queue attendent que toutes les chunks
// soit process lors d'un reindex global
timeout: 24 * 3600 * 1000
},
settings: {
// https://github.com/OptimalBits/bull?tab=readme-ov-file#important-notes
// https://github.com/OptimalBits/bull/issues/1591
lockDuration: 2 * 60 * 1000, // 2 minutes - default 3000 (30s)
// prevent the job from being run twice if it is stalled
maxStalledCount: 0 // default is 1
}
}
);
Expand Down