-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(indexer): better logs, skipping already-indexed events, adding R…
…eindexRequest (#625) * feat(indexer): adding logs and manual indexing - WIP * feat(indexer,api): skip already-indexed events, added ReindexRequest * updating help text * feat(indexer): remove condition that prevents updating summary from previous block * fix(indexer,api): event unique on tx_hash+chain, prevent overwrite newer info * fix: added back last_updated_in_block * chore(indexer): changing if/else to match
- Loading branch information
1 parent
5fe4be1
commit adfadac
Showing
6 changed files
with
352 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
api/stake/migrations/0006_reindexrequest_alter_stakeevent_block_number_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Generated by Django 4.2.6 on 2024-07-02 21:30 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("stake", "0005_alter_stake_current_amount_alter_stakeevent_amount"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="ReindexRequest", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("created_at", models.DateTimeField(auto_now_add=True)), | ||
( | ||
"chain", | ||
models.IntegerField( | ||
db_index=True, | ||
help_text="Decimal chain ID. Ethereum: 1, Optimism: 10, Arbitrum: 42161", | ||
), | ||
), | ||
( | ||
"start_block_number", | ||
models.DecimalField(decimal_places=0, max_digits=78), | ||
), | ||
("pending", models.BooleanField(db_index=True, default=True)), | ||
], | ||
), | ||
migrations.AlterField( | ||
model_name="stakeevent", | ||
name="block_number", | ||
field=models.DecimalField(db_index=True, decimal_places=0, max_digits=78), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name="stakeevent", | ||
unique_together={("tx_hash", "chain")}, | ||
), | ||
migrations.AddConstraint( | ||
model_name="reindexrequest", | ||
constraint=models.UniqueConstraint( | ||
condition=models.Q(("pending", True)), | ||
fields=("chain",), | ||
name="unique_only_one_pending_per_chain", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.