Support deployments where git hook have a read-only access to the db
As the update to the documentation in this commit explain, some pagure
deployment are not using the standard gitolite deployment method and
thus for security reasons, the git hook are only given a read-only
access to the database.
This new configuration allows for pagure to behave differently if the
database access is read-only or read-write.
In this case, the default hook which clears the cache status of all
the open PRs of a project upon push to its git repo requires read-
write access (otherwise it can't clear the cache status). So if the
hook as read-only access to the DB, this action is proceed by a
worker, asynchronously instead of being done in the same process as
the push.
This could lead to some race conditions but there isn't much we can
do with these constraints.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr></pingou@pingoured.fr>