Improve the OnboardingService to not write to the database within git-fetch endpoints
During a git fetch operation, we are writing to the database to track the onboarding, and logging when a git_read action takes place in the Onboarding.register.
Having a database write inside an endpoint means the endpoint will use the primary database and then continue to use it for all other queries. Therefore it is beneficial to try to get the writes out of very frequently used endpoints like the git-fetch ones.
One option is to offload this to Sidekiq, so it's out of this hot path. We would need to make sure that the jobs are deduplicated for the namespace they're running for, so we don't have multiple no-op jobs in there.
Edited by Rachel Nienaber