Closes #398; should be scoped to individual users.
Lock should be exclusive and blocking (with a timeout?), would prevent this exception:
2015-08-10 17:05:00,650 - chime.view_functions - ERROR - 'git checkout mrzpgtqzh' returned exit status 128: fatal: Unable to create '/var/opt/chime-work/repo-e9f809ca-william-persona-org-codeforamerica-org/.git/index.lock': File exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
Traceback (most recent call last):
File "/home/ubuntu/chime/chime/view_functions.py", line 452, in decorated_function
return route_function(*args, **kwargs)
File "/home/ubuntu/chime/chime/view_functions.py", line 505, in decorated_function
return route_function(*args, **kwargs)
File "/home/ubuntu/chime/chime/view_functions.py", line 577, in decorated_function
branch.checkout()
File "/usr/local/lib/python2.7/dist-packages/git/refs/head.py", line 218, in checkout
self.repo.git.checkout(self, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 227, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 456, in _call_process
return self.execute(call, **_kwargs)
File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 377, in execute
raise GitCommandError(command, status, stderr_value)
GitCommandError: 'git checkout mrzpgtqzh' returned exit status 128: fatal: Unable to create '/var/opt/chime-work/repo-e9f809ca-william-persona-org-codeforamerica-org/.git/index.lock': File exists.
Closes #398; should be scoped to individual users.
Lock should be exclusive and blocking (with a timeout?), would prevent this exception: