From fa180c9374262c89e702a82e5a8e1c9575e43cb1 Mon Sep 17 00:00:00 2001 From: Anderson Nelson Date: Sun, 3 Nov 2024 10:49:35 -0500 Subject: [PATCH] fix tweet error --- main.py | 7 +------ nearquake/data_processor.py | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/main.py b/main.py index ab1f014..25c9143 100644 --- a/main.py +++ b/main.py @@ -70,17 +70,12 @@ for time in ["hour", "day", "week"]: run.upload(url=generate_time_period_url(time)) tweet.upload() - loc.upload( - start_date=convert_datetime(datetime.now().date()), - upload_type="single", - ) start_date = datetime.now().date() - timedelta(days=30) end_date = datetime.now().date() loc.backfill( start_date=convert_datetime(start_date, format_type="date"), - end_date=convert_datetime(end_date, format_type="date"), - upload_type="batch", + end_date=convert_datetime(end_date, format_type="date") ) if args.daily: diff --git a/nearquake/data_processor.py b/nearquake/data_processor.py index 2f7f6a9..48691ff 100644 --- a/nearquake/data_processor.py +++ b/nearquake/data_processor.py @@ -319,7 +319,7 @@ def upload(self): ) try: - self.post_tweet(tweet_text=tweet_text, conn=self.conn) + self.run_tweet_operator(tweet_text=tweet_text, conn=self.conn) _logger.info( "Recorded recent tweet posted in the database recent into the Database " )