kopia lustrzana https://github.com/bugout-dev/moonstream
changed default time for sync to 1st jan of 20201
rodzic
8d11e1c8f0
commit
94e7069c8a
|
@ -126,8 +126,7 @@ def sync_labels(db_session: Session, web3_client: Web3, start: Optional[int]) ->
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Didn't find any nft labels in db, starting sync from 3 month before now"
|
"Didn't find any nft labels in db, starting sync from 3 month before now"
|
||||||
)
|
)
|
||||||
time_now = datetime.now(timezone.utc)
|
start_date = datetime(2021, 1, 1, tzinfo=timezone.utc)
|
||||||
start_date = time_now - relativedelta(months=3)
|
|
||||||
start = (
|
start = (
|
||||||
db_session.query(EthereumBlock)
|
db_session.query(EthereumBlock)
|
||||||
.filter(EthereumBlock.timestamp >= start_date.timestamp())
|
.filter(EthereumBlock.timestamp >= start_date.timestamp())
|
||||||
|
@ -166,8 +165,7 @@ def sync_summaries(
|
||||||
logger.info(
|
logger.info(
|
||||||
"There is no entry in Bugout, starting to create summaries from 3 month ago"
|
"There is no entry in Bugout, starting to create summaries from 3 month ago"
|
||||||
)
|
)
|
||||||
time_now = datetime.now(timezone.utc)
|
start_date = datetime(2021, 1, 1, tzinfo=timezone.utc)
|
||||||
start_date = time_now - relativedelta(months=3)
|
|
||||||
start = (
|
start = (
|
||||||
db_session.query(EthereumBlock)
|
db_session.query(EthereumBlock)
|
||||||
.filter(EthereumBlock.timestamp >= start_date.timestamp())
|
.filter(EthereumBlock.timestamp >= start_date.timestamp())
|
||||||
|
|
Ładowanie…
Reference in New Issue