-
Notifications
You must be signed in to change notification settings - Fork 3
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
Paralel processing of incoming hook calls #8
Comments
AFAIK that second request can be safely discarded because it will be included in the Travis rebuild. All that needs to be done is to properly handle the error (without screwing up a case where git previously in fact died). |
Not necessarily though. Imagine the following situation. Branch I push to A: Starts pulling the repository However since |
Oh, right. |
So today I got a first errors report on Sentry from the app, specifically that the pulling of the repository failed because there was already a pull in progress in a different process - two requests came at a very similar time (two seconds apart) and because I configured Apache to have two workers, it processed them in parallel.
It happened for the first time since the app started to be used, so we might not need to solve it yet, but eventually it might become more of a problem.
Two possible solutions come into mind - reducing the number of workers to one (not really ideal) or some kind of locking mechanism around the pulling of the repository.
The error message:
The text was updated successfully, but these errors were encountered: