Closed leodaher closed 2 years ago
Also reported in https://github.com/gevent/gevent/issues/1615. There are a number of issues with the example provided that need to be worked through first.
@leodaher I am not familiar with 'Gevent' library ,but in your scenario you can use sleep
or join
method which will help to get output.
code snippet:
if __name__ == '__main__':
gevent.spawn(listen)
while True:
gevent.sleep(1)
OR:
if __name__ == '__main__':
gev = gevent.spawn(listen)
gev.join()
I need to use the realtime snapshot available from Firestore, and in my application, I am trying to use it inside a Gevent Greenlet, but it does not work as expected. Here's a sample script:
If I make any changes to the
orders
collection, nothing is printed in the stdout. Now, if I change the last lines of the script so it doesn't run inside Gevent, it works as expected:These are the environment details in which I am running the script:
google-cloud-firestore
version: 1.6.2gevent
version: 1.5a4