web.py 执行thread报错internal server error

12 views
Skip to first unread message

mahe su

unread,
Aug 5, 2016, 11:44:17 PM8/5/16
to sae-python
def GET(self):
data = web.input()
if data.__len__() == 1:
status = data.status
status = int(status)
if status == 1:
thread.start_new_thread(self.sendEmailTask)
else:
thread.exit()
return "success"
return "no params"

本地测试可以执行sendEmailTask方法,上传到sae后报错internet server error

陈峰

unread,
Aug 7, 2016, 10:05:26 PM8/7/16
to sae-p...@googlegroups.com
你好,不支持线程,异步任务请使用https://www.sinacloud.com/doc/sae/python/background-jobs-with-rq.html来实现。

--
邮件来自: SAE Python 邮件列表
发言: sae-p...@googlegroups.com
退订: sae-python+unsubscribe@googlegroups.com (向此发空信即退!)

Reply all
Reply to author
Forward
0 new messages