add cron jobs for ATProto polling posts and notifications

fixes #942
pull/965/head
Ryan Barrett 2024-04-17 19:53:04 -07:00
rodzic 8077a7f4ca
commit 5556f2756b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
2 zmienionych plików z 15 dodań i 2 usunięć

13
cron.yaml 100644
Wyświetl plik

@ -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

4
hub.py
Wyświetl plik

@ -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