Esempio n. 1
0
def commit_veto(request, response):
    # The default vetoes on response status != 2xx
    vetoed = default_commit_veto(request, response)
    if not vetoed and request.method in ('GET', 'POST', 'PUT', 'DELETE'):
        # we abuse the commit_veto call (called at the end of each request by
        # the pyramid transaction manager)
        # to also commit to solr
        request.solr.commit(soft_commit=OPTIMIZATION_SOFT_COMMIT)
    return vetoed
Esempio n. 2
0
 def _callFUT(self, response, request=None):
     from pyramid_tm import default_commit_veto
     return default_commit_veto(request, response)
Esempio n. 3
0
 def _callFUT(self, response, request=None):
     from pyramid_tm import default_commit_veto
     return default_commit_veto(request, response)