diff --git a/src/sync/batch_data.py b/src/sync/batch_data.py index ada4453..0dbff89 100644 --- a/src/sync/batch_data.py +++ b/src/sync/batch_data.py @@ -1,7 +1,7 @@ -"""Main Entry point for price feed sync""" +"""Main Entry point for batch data sync""" +import os from dune_client.client import DuneClient import web3 -import os from src.fetch.orderbook import OrderbookFetcher from src.logger import set_log from src.sync.config import BatchDataSyncConfig diff --git a/src/sync/common.py b/src/sync/common.py index aa248b4..94da1db 100644 --- a/src/sync/common.py +++ b/src/sync/common.py @@ -95,7 +95,16 @@ def compute_block_and_month_range(node: Web3): current_month_end_datetime.year - 1, 12, 1, 00, 00 ) else: - previous_month = f"{current_month_end_datetime.year}_{current_month_end_datetime.month - 1}" + previous_month = f"""{current_month_end_datetime.year}_ + {current_month_end_datetime.month - 1} + """ + previous_month_start_datetime = datetime( + current_month_end_datetime.year, + current_month_end_datetime.month - 1, + 1, + 00, + 00, + ) months_list.append(previous_month) previous_month_start_timestamp = previous_month_start_datetime.replace( tzinfo=timezone.utc