0
我想从python中的worker角色监听azure队列。 有没有办法编写一个函数,只有当一个新的消息即将到来时才会触发? 与Python的工具Visual Studio中的模板代码为:聆听来自python的web工作的azure队列消息
if __name__ == '__main__':
while True:
#
# Write your worker process here.
#
# You will probably want to call a blocking function such as
# bus_service.receive_queue_message('queue name', timeout=seconds)
# to avoid consuming 100% CPU time while your worker has no work.
#
sleep(1.0)
我可以看到,对于服务BU有一个监听功能,但我无法找到一个队列API
感谢您的回答,功能应用程序可以适用于长时间运行的任务谎言nlp分析? – royi
@royi不,我想。 Function Apps是一个无服务器的Web框架,我不认为将它用于NLP分析(如Python中的NLTK)并不是一个好主意。 –
Python在功能应用程序中仍受实验支持。没有在生产环境中使用。 – SILENCE