Look up upstream commits once before queuing ProcessCommitWorkers
What does this MR do?
Resolves https://gitlab.com/gitlab-org/gitlab-ce/issues/65464 by implementing the solution proposed in https://gitlab.com/gitlab-org/gitlab-ce/issues/65464#note_203406659.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios. - [-] Documentation created/updated or follow-up review issue created
-
Code review guidelines - [-] Merge request performance guidelines
-
Style guides - [-] Database guides
- [-] Separation of EE specific content