diff --git a/main.py b/main.py index 35bb476..dea1a78 100644 --- a/main.py +++ b/main.py @@ -16,6 +16,7 @@ UploadEarthQuakeLocation, get_date_range_summary, ) + from nearquake.post_manager import post_to_all_platforms, save_tweet_to_db from nearquake.open_ai_client import generate_response from nearquake.utils import convert_datetime, format_earthquake_alert diff --git a/nearquake/post_manager.py b/nearquake/post_manager.py index 10b540c..b36e031 100644 --- a/nearquake/post_manager.py +++ b/nearquake/post_manager.py @@ -54,7 +54,6 @@ def post(self, post_text: str) -> bool: _logger.error(f"Failed to post to BlueSky: {post_text}. Error: {e}") return False - def save_tweet_to_db(tweet_text: dict, conn) -> bool: """ Save the posted tweet data into the database. @@ -69,7 +68,6 @@ def save_tweet_to_db(tweet_text: dict, conn) -> bool: _logger.error(f"Failed to save tweet to database {tweet_text}. Error: {e}") return False - def post_to_all_platforms(post_text: str) -> dict: platforms = [TwitterPost(), BlueSkyPost()] for platform in platforms: diff --git a/requirements.txt b/requirements.txt index d1e232d..3a12fc6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -alembic==1.13.3 +alembic==1.14.0 atproto==0.0.56 black==24.10.0 openai==1.30.3 @@ -6,7 +6,7 @@ pillow==10.2.0 psycopg2-binary==2.9.10 requests==2.32.2 SQLAlchemy==2.0.24 -tqdm==4.66.6 +tqdm==4.67.1 tweepy==4.14.0 python-dotenv==1.0.1 urllib3>=2.2.2 # not directly required, pinned by Snyk to avoid a vulnerability