mattia / pagure

Forked from pagure 3 years ago
Clone

5c0786e Support deployments where git hook have a read-only access to the db

2 files Authored by pingou 5 years ago, Committed by pingou 5 years ago,
    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>
    
        
file modified
+15 -0
file modified
+14 -6