Skip to content

Commit

Permalink
Stay with atproto==0.0.56 for now
Browse files Browse the repository at this point in the history
  • Loading branch information
richardr1126 committed Jan 23, 2025
1 parent a00b40c commit 03f820d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions firehose/health_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
from database import db, SubscriptionState

def is_healthy():
state = None
with db.connection_context():
state = SubscriptionState.get_or_none()
if not state or not state.last_indexed_at:
return False
return (datetime.now(timezone.utc) - state.last_indexed_at) < timedelta(minutes=5)
with db.atomic():
state = SubscriptionState.get_or_none()

if not state or not state.last_indexed_at:
return False
return (datetime.now(timezone.utc) - state.last_indexed_at) < timedelta(minutes=5)

if __name__ == "__main__":
if is_healthy():
Expand Down
2 changes: 1 addition & 1 deletion firehose/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
psycopg2-binary
atproto
atproto==0.0.56
peewee
python-dotenv
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
atproto
atproto==0.0.56
peewee
Flask
python-dotenv
Expand Down
2 changes: 1 addition & 1 deletion scheduler/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
atproto
atproto==0.0.56
apscheduler
peewee
psycopg2-binary
Expand Down

0 comments on commit 03f820d

Please sign in to comment.