uskudnik / amazon-glacier-cmd-interface

Command line interface for Amazon Glacier
MIT License
375 stars 103 forks source link

patch to allow for delayed input on pipes (stdin) #155

Open sivann opened 10 years ago

sivann commented 10 years ago

when trying to upload an sql dump from stdin, glacier-cmd always failed with "There is nothing to upload", because our DB is 6TB and pg_dump takes a bit to start. This was solved by adding a timeout >0 to select:

in glacier/GlacierWrapper.py:

-        elif select.select([sys.stdin,],[],[],0.0)[0]:
+        elif select.select([sys.stdin,],[],[],2.0)[0]:
nilp0inter commented 6 years ago

I was trying to upload the output of an on-the-fly generated tar file and I was getting the same error. This patch worked for me too.