【发布时间】:2011-05-16 12:06:09
【问题描述】:
我正在使用 Django / GAE / Python 环境执行此操作:
cron:
#run events every 12 hours
和
def events(request):
# read all records
# Do some processing on a few records
return http.HTTPResponseGone('Some Records are modified' )
生产结果: 作业按时运行并显示“失败”消息 但是,它已根据需要在数据存储上完成了这项工作 没有看到错误日志条目 开发:没有错误;返回消息 'Some Records are modified'
是否可以避免返回 HTTP 响应?我不需要 HTTPResponse,但是,我保留了它,因为开发服务器测试在没有它的情况下失败。可以来一个 帮我把代码弄干净?
【问题讨论】:
标签: django google-app-engine cron httpresponse