Frage

Ich experimentiere mit der asynchronen URL-Schnittstelle abgerufen werden. Aber wenn Rückrufe auf der Produktionsumgebung eingesetzt werden, erhalte ich eine AssertionError.

Ist das vom Datenspeicher-Zugang in der Callback-Funktion verursacht? Welche Grenzen gibt es in der Callback-Funktion? Gibt es andere APIs, die nicht asynchron ausgeführt werden können?

Hier ist der Stapel ...

('The Wait() request was interrupted by an exception from another callback:', AssertionError('1',))
Traceback (most recent call last):
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 513, in __call__
    handler.post(*groups)
  File "/base/data/home/apps/smsmybus/15.344643308619037909/main.py", line 153, in post
    self.get()
  File "/base/data/home/apps/smsmybus/15.344643308619037909/main.py", line 182, in get
    bus.aggregateBusesAsynch(smsBody,self.request.get('SmsSid'),self.request.get('From'))
  File "/base/data/home/apps/smsmybus/15.344643308619037909/bus.py", line 296, in aggregateBusesAsynch
    rpc.wait()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 460, in wait
    self.__rpc.Wait()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_rpc.py", line 112, in Wait
    rpc_completed = self._WaitImpl()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/runtime/apiproxy.py", line 108, in _WaitImpl
    rpc_completed = _apphosting_runtime___python__apiproxy.Wait(self)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/runtime/apiproxy.py", line 171, in __MakeCallDone
    self.__Callback()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_rpc.py", line 161, in __Callback
    self.callback()
  File "/base/data/home/apps/smsmybus/15.344643308619037909/bus.py", line 265, in <lambda>
    return lambda: handle_result(rpc,stopID,routeID,sid,directionID)
  File "/base/data/home/apps/smsmybus/15.344643308619037909/bus.py", line 252, in handle_result
    stop.put()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 893, in put
    return datastore.Put(self._entity, rpc=rpc)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 291, in Put
    'datastore_v3', 'Put', req, datastore_pb.PutResponse(), rpc)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 194, in _MakeSyncCall
    rpc.wait()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 461, in wait
    assert self.__rpc.state == apiproxy_rpc.RPC.FINISHING, repr(self.state)
InterruptedError: ('The Wait() request was interrupted by an exception from another callback:', AssertionError('1',))
War es hilfreich?

Lösung

meine eigene Antwort Hinzufügen ihn nur aus schließen ...

Nick hatte Recht. Ich versuchte, die Rückrufe ausführen nach die Anfrage hatte abgeschlossen. Ich war die Wartezeit Anrufe nicht korrekt verwendet wird.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top