diff --git a/cron.yaml b/cron.yaml new file mode 100644 index 0000000..b7b81f2 --- /dev/null +++ b/cron.yaml @@ -0,0 +1,13 @@ +# timezone defaults to UTC +# docs: https://cloud.google.com/appengine/docs/standard/python3/scheduling-jobs-with-cron-yaml + +cron: +- description: ATProto poll posts + url: /queue/atproto-poll-posts + schedule: every 15 minutes + target: hub + +- description: ATProto poll notifications + url: /queue/atproto-poll-notifs + schedule: every 15 minutes + target: hub diff --git a/hub.py b/hub.py index 12504d9..038d912 100644 --- a/hub.py +++ b/hub.py @@ -60,11 +60,11 @@ lexrpc.flask_server.init_flask(arroba.server.server, app) app.add_url_rule('/queue/atproto-poll-notifs', view_func=atproto.poll_notifications, - methods=['POST']) + methods=['GET', 'POST']) app.add_url_rule('/queue/atproto-poll-posts', view_func=atproto.poll_posts, - methods=['POST']) + methods=['GET', 'POST']) @app.post('/queue/atproto-commit') @flask_util.cloud_tasks_only