Django HTTP Response object for GAE Cron
I am doing this using Django / GAE / Python environment:
cron:
#run events every 12 hours
and
def events(request):
# read all records
# Do some processing on a few records
return http.HTTPResponseGone('Some Records are modified' )
Result in production : Job runs on time with 'failed' message However, it has done the job exactly on the datastore as required No error log entry seen 开发者_如何学JAVA Dev : No errors ; returns the message 'Some Records are modified'
Is it possible to avoid HTTP Response returned ? There is no need for HTTPResponse for me, however, I have kept this as Dev server testing fails in its absence. Can some one help me to make the code clean?
Gone is error 410. You should return 200 Success if the operation succeeds. When you return HttpResponse
, the default status is 200.
精彩评论