Skip to content

Commit 03ea5e6

Browse files
Fix some Websocket issues, remove Index.head relation (#144)
* Fix action order in callbacks, refactor datasource class * Fix race in emitter * typo * Another typo * Another typo * Another typo * Another typo * Let callbacks handle locks by themselves * FFFFUUU * Fix missing level on emit * Another stupid typo * Emit timeout * Capture exceptions early * Log dead tasks * Drop pyee ☠ * Rename callbacks * Unlink head * Cleanup * Cleanup, fix ugly database logger setting * Typos * Update changelog * BlockCache improvements * typo; * Ignore missing head * Fix dipdup initialization order * Changelog * Cleanup * Fix cleaning up old blocks * Drop Index.hash * Cleanup * Cleanup * Drop `stateless` fields * Drop BlockCache, simplify block hash checks * Cleanup * Check operation status before converting * Comment * Changelog * Cleanup, drop useless self.level check in datasource * Head constraint * Revert multiple heads, add docs * Changelog * Lint * Kill me please * Dont do sql in ws loop * Head sub, typing * Codestyle, cache blocks on init, bigmap fixes * Typo * Docs
1 parent 5808c9a commit 03ea5e6

File tree

21 files changed

+259
-367
lines changed

21 files changed

+259
-367
lines changed

CHANGELOG.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,24 @@
55
### Added
66

77
* Human-readable `CHANGELOG.md` 🕺
8-
* `--forbid-reindexing` option added to `dipdup run` command. When this flag is set DipDup will raise `ReindexingRequiredError` instead of truncating database when reindexing is triggered for any reason.
8+
* `--forbid-reindexing` option added to `dipdup run` command. If this flag is set, DipDup will raise `ReindexingRequiredError` when reindexing is triggered for any reason. A database won't be truncated. To continue indexing with existing database run `UPDATE dipdup_schema SET reindex = NULL;`
9+
10+
### Changed
11+
12+
* Migration to this version requires reindexing.
13+
* `dipdup_index.head_id` foreign key removed. `dipdup_head` table still contains the latest blocks from Websocket received by each datasource.
914

1015
### Fixed
1116

12-
* Removed unnecessary calls to TzKT API during the partial sync.
17+
* Removed unnecessary calls to TzKT API.
1318
* Fixed removal of PostgreSQL extensions (`timescaledb`, `pgcrypto`) by function `truncate_database` triggered on reindex.
14-
* Fixed updating relation between index and head in DB.
1519
* Fixed creation of missing project package on `init`.
1620
* Fixed invalid handler callbacks generated on `init`.
1721
* Fixed detection of existing types in the project.
22+
* Fixed race condition caused by event emitter concurrency.
23+
* Capture unknown exceptions with Sentry before wrapping to `DipDupError`.
24+
* Fixed job scheduler start delay.
25+
* Fixed processing of reorg messages.
1826

1927
## 3.0.1 - 2021-09-24
2028

poetry.lock

Lines changed: 1 addition & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ tortoise-orm = "0.17.5"
3030
pydantic = "^1.8.1"
3131
aiosignalrcore = "^0.9.2"
3232
fcache = "^0.4.7"
33-
pyee = "^8.1.0"
3433
APScheduler = "^3.7.0"
3534
sentry-sdk = "^1.1.0"
3635
pyhumps = "^3.0.2"

src/demo_hic_et_nunc/hooks/on_rollback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from dipdup.context import HookContext
22
from dipdup.datasources.datasource import Datasource
3-
from dipdup.exceptions import ReindexingReason
3+
from dipdup.enums import ReindexingReason
44

55

66
async def on_rollback(

src/demo_quipuswap/hooks/on_rollback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from dipdup.context import HookContext
22
from dipdup.datasources.datasource import Datasource
3-
from dipdup.exceptions import ReindexingReason
3+
from dipdup.enums import ReindexingReason
44

55

66
async def on_rollback(

src/demo_registrydao/hooks/on_rollback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from dipdup.context import HookContext
22
from dipdup.datasources.datasource import Datasource
3-
from dipdup.exceptions import ReindexingReason
3+
from dipdup.enums import ReindexingReason
44

55

66
async def on_rollback(

src/demo_tezos_domains/hooks/on_rollback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from dipdup.context import HookContext
22
from dipdup.datasources.datasource import Datasource
3-
from dipdup.exceptions import ReindexingReason
3+
from dipdup.enums import ReindexingReason
44

55

66
async def on_rollback(

src/demo_tezos_domains_big_map/hooks/on_rollback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from dipdup.context import HookContext
22
from dipdup.datasources.datasource import Datasource
3-
from dipdup.exceptions import ReindexingReason
3+
from dipdup.enums import ReindexingReason
44

55

66
async def on_rollback(

src/demo_tzbtc/hooks/on_rollback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from dipdup.context import HookContext
22
from dipdup.datasources.datasource import Datasource
3-
from dipdup.exceptions import ReindexingReason
3+
from dipdup.enums import ReindexingReason
44

55

66
async def on_rollback(

src/demo_tzcolors/hooks/on_rollback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from dipdup.context import HookContext
22
from dipdup.datasources.datasource import Datasource
3-
from dipdup.exceptions import ReindexingReason
3+
from dipdup.enums import ReindexingReason
44

55

66
async def on_rollback(

0 commit comments

Comments
 (0)