Мои задания cron в Google App Engine перестали работать несколько дней назад.Это отвечает 404 кода.Это странно, потому что я не менял файлы yaml, и он работал правильно.
Любая помощь приветствуется.Спасибо!
cron.yaml
cron:
- description: Push a "tick" onto pubsub every 5 minutes
url: /publish/minutes-5-tick
schedule: every 5 minutes
- description: Push a "tick" onto pubsub every hour
url: /publish/hourly-tick
schedule: every 1 hours
- description: Push a "tick" onto pubsub every hour
url: /publish/hourly-tick-2
schedule: every 1 hours
- description: Push a "tick" onto pubsub every day
url: /publish/daily-tick
schedule: every 24 hours
- description: Push a "tick" onto pubsub every week
url: /publish/weekly-tick
schedule: every saturday 00:00
app.yaml
runtime: python27
api_version: 1
threadsafe: true
handlers:
# Handler for the pubsub cron.
- url: /publish/.*
script: main.app
login: admin
secure: always
- url: /.*
script: main.app
libraries:
- name: webapp2
version: latest
- name: pycrypto
version: latest
- name: ssl
version: latest
instance_class: F1
main.py
class PushToPubSub(webapp2.RequestHandler):
def get(self, topic):
pubsub_utils.publish_to_topic(topic, str(time.time()))
self.response.headers['Content-Type'] = 'application/json'
self.response.write(json.dumps({"status": "200"}))
app = webapp2.WSGIApplication([
webapp2.Route(r'/publish/', handler=PushToPubSub)
], debug=True)