def start(self, delay): self._executionDelay = delay try: self.run() self.endedOn = self._getCurrentDateTime() finally: LDAPConnector.destroy() self.running = False
def start(self, delay): if self.DISABLE_ZODB_HOOK: update_session_options(db) self._executionDelay = delay try: self.run() self.endedOn = self._getCurrentDateTime() finally: LDAPConnector.destroy() self.running = False
'timestamp'), separate=True) ak.used(request.remote_addr, normPath, normQuery, not onlyPublic) try: dbi.endRequest(True) except ConflictError: pass # retry else: break else: # No need to commit stuff if we didn't use an API key # (nothing was written) dbi.endRequest(False) LDAPConnector.destroy() # Log successful POST api requests if error is None and request.method == 'POST': logger.info('API request: %s?%s' % (path, query)) serializer = Serializer.create(dformat, query_params=queryParams, pretty=pretty, typeMap=typeMap, **hook.serializer_args) if error: if not serializer.schemaless: # if our serializer has a specific schema (HTML, ICAL, etc...) # use JSON, since it is universal serializer = Serializer.create('json')
for _retry in xrange(10): dbi.sync() normPath, normQuery = normalizeQuery(path, query, remove=('signature', 'timestamp'), separate=True) ak.used(request.remote_addr, normPath, normQuery, not onlyPublic) try: dbi.endRequest(True) except ConflictError: pass # retry else: break else: # No need to commit stuff if we didn't use an API key # (nothing was written) dbi.endRequest(False) LDAPConnector.destroy() # Log successful POST api requests if error is None and request.method == 'POST': logger.info('API request: %s?%s' % (path, query)) serializer = Serializer.create(dformat, query_params=queryParams, pretty=pretty, typeMap=typeMap, **hook.serializer_args) if error: if not serializer.schemaless: # if our serializer has a specific schema (HTML, ICAL, etc...) # use JSON, since it is universal serializer = Serializer.create('json') result = fossilize(error) else: