facebookarchive / pyaib

An easy to use Python Framework (that uses gevent) for writing IRC Bots.
Apache License 2.0
337 stars 71 forks source link

subprocess blocking causes pyaib to timeout #10

Closed zodman closed 9 years ago

zodman commented 9 years ago

if i use from subprocess import call the call command execute a ncftpget and download a file and take a lot of time to execute...

so the greenlet thread get stuck and not answer the ping from irc server ...

zodman commented 9 years ago

update the title

fried commented 9 years ago

Pyaib calls patch_all, but patch_subprocess is not enable in that by default. Just Add: from gevent.monkey import patch_subprocess patch_subprocess()

to your code

zodman commented 9 years ago

tnx!