I have the following code and half the time my requests to Connector don't work with it...
if __name__ == "__main__":
connector.startLongPolling()
connector.setHandler('notifications', notificationHandler) # send 'notifications' to the notificationHandler FN
bla = connector.putResourceSubscription('38e7a161-1932-4da1-a76e-39e9999ad258', KNOCK_RESOURCE)
while not bla.isDone():
None
if bla.error:
raise Error(bla.error)
app = web.application(urls, globals())
app.run()
This all goes fine, but when I do a request to Connector it never completes.
Then I restart and suddenly it works (and vice-versa).
Using connector via:
e = connector.getResourceValue(id, KNOCK_RESOURCE)
while not e.isDone():
None
if e.error:
raise Error(e.error)
pprint.pprint(e.raw_data)
I have the following code and half the time my requests to Connector don't work with it...
This all goes fine, but when I do a request to Connector it never completes.
Then I restart and suddenly it works (and vice-versa).
Using connector via: