Cron works on local host but not when deployed Appengine

前端 未结 1 576
北荒
北荒 2020-12-21 09:29

I have a cron job in python that works on my localhost but when it is deployed to appengine, it no longer works.

  pl = db.Query(Venue).order(\"id\")
    li         


        
相关标签:
1条回答
  • 2020-12-21 10:01

    The JSON 'results' field is not returned because the requests per Ip that Twitter allows has reached the max quota of available requests; this explains why from your domestic IP you don't have any problem and you don't get an HTTP 420 response code.

    Unluckily Google App Engine uses a shared pool of IP addresses* for outgoing urlfetch requests and Twitter search APIs does not support authentication.

    Search API Rate Limiting

    Requests to the Search API, hosted on search.twitter.com, do not count towards the REST API limit. However, all requests coming from an IP address are applied to a Search Rate Limit. The Search Rate Limit isn't made public to discourage unnecessary search usage and abuse, but it is higher than the REST Rate Limit. We feel the Search Rate Limit is both liberal and sufficient for most applications and know that many application vendors have found it suitable for their needs.

    This would force you to seriously think if Google App Engine is a correct choice for your application.

    *I had the same problem here but luckily the API's developer has enabled an authentication mechanism that allows authenticated requests from the same IP.

    0 讨论(0)
提交回复
热议问题