Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
harisang committed Nov 22, 2024
1 parent d7f84dd commit 7900e35
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/sync/batch_data.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 10 additions & 1 deletion src/sync/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7900e35

Please sign in to comment.