From 94e7069c8af8c63f503d6909b30fb73ca39d5499 Mon Sep 17 00:00:00 2001 From: yhtiyar Date: Tue, 21 Sep 2021 18:47:13 +0300 Subject: [PATCH] changed default time for sync to 1st jan of 20201 --- crawlers/mooncrawl/mooncrawl/nft/cli.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crawlers/mooncrawl/mooncrawl/nft/cli.py b/crawlers/mooncrawl/mooncrawl/nft/cli.py index 4afc2fcb..393429fc 100644 --- a/crawlers/mooncrawl/mooncrawl/nft/cli.py +++ b/crawlers/mooncrawl/mooncrawl/nft/cli.py @@ -126,8 +126,7 @@ def sync_labels(db_session: Session, web3_client: Web3, start: Optional[int]) -> logger.warning( "Didn't find any nft labels in db, starting sync from 3 month before now" ) - time_now = datetime.now(timezone.utc) - start_date = time_now - relativedelta(months=3) + start_date = datetime(2021, 1, 1, tzinfo=timezone.utc) start = ( db_session.query(EthereumBlock) .filter(EthereumBlock.timestamp >= start_date.timestamp()) @@ -166,8 +165,7 @@ def sync_summaries( logger.info( "There is no entry in Bugout, starting to create summaries from 3 month ago" ) - time_now = datetime.now(timezone.utc) - start_date = time_now - relativedelta(months=3) + start_date = datetime(2021, 1, 1, tzinfo=timezone.utc) start = ( db_session.query(EthereumBlock) .filter(EthereumBlock.timestamp >= start_date.timestamp())