Python Gearman get data from background task

情到浓时终转凉″ 提交于 2019-12-06 00:25:13
SpamapS

background tasks are called such because they allow the client that submitted them to un-block and work disconnected. They do not keep a channel of communication open to the client, so you won't get any of those status updates. They essentially go into the bit-bucket. If you want a background task to communicate its progress, you need to have some other channel for it to communicate with interested programs.

If you want the client to keep running and get updates, but not block on them, you can use the "task" method where you add a bunch of tasks, and then wait for any of them to provide status or be completed. I'm not sure if the pure python gearman interface has this, but the libgearman interface does. Its available in source form here https://launchpad.net/gearman-interface or in some versions of Ubuntu/Debian as python-gearman.libgearman.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!