pr_17960.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. diff --git a/services/project-history/scripts/force_resync.js b/services/project-history/scripts/force_resync.js
  2. index 5e77b35826..13e7d3cd5c 100755
  3. --- services/project-history/scripts/force_resync.js
  4. +++ services/project-history/scripts/force_resync.js
  5. @@ -77,7 +77,7 @@ function checkAndClear(project, callback) {
  6. function startResync(cb) {
  7. if (force) {
  8. console.log('2. starting resync for', projectId)
  9. - SyncManager.startResync(projectId, err => {
  10. + SyncManager.startHardResync(projectId, err => {
  11. if (err) {
  12. console.log('ERR', JSON.stringify(err.message))
  13. return cb(err)
  14. @@ -195,17 +195,8 @@ function checkAndClear(project, callback) {
  15. )
  16. }
  17. -// find all the broken projects from the failure records
  18. -const errorsToResync = [
  19. - 'Error: history store a non-success status code: 422',
  20. - 'OError: history store a non-success status code: 422',
  21. - 'OpsOutOfOrderError: project structure version out of order',
  22. -]
  23. -
  24. async function main() {
  25. - const results = await db.projectHistoryFailures
  26. - .find({ error: { $in: errorsToResync } })
  27. - .toArray()
  28. + const results = await db.projectHistoryFailures.find().toArray()
  29. console.log('number of queues without history store 442 =', results.length)
  30. // now check if the project is truly deleted in mongo