Skip to content

Commit 937e932

Browse files
Hooks, typed callbacks, more builtin tables, no more tempstates (#119)
* Keep more details about index state * WIP * Hooks WIP * WIP * WIP * callback codegen WIP * Finish callback codegen * Update demos * Cleanup * Better template substitution * CallbackManager, rewrite config initialization * Rewrite config module * Refactor codegen mixin, add locate * Finish and integrate CallbackManager * Codegen fixes * Fix * Dipdup models state wip * `run` refactoring * Create context in callback manager * DB states wip * State initialization * Fix head updating, state * No more temporary states! * Bump mypy * Lint * Split execute_sql * Fix codegen, revert SQL execution logic, 20% cooler exceptions * Fix rollback * Bump hasura, skip warning for missing default hooks * Fix graceful shutdown 🎉🎉🎉 * Fix PArentMixin generic * DatabaseConfigurationError, refactoring * Docs * dipdup.config refactoring * Spawn indexes early * useless initialize * Resolve missing table names before Hasura does * Another jobs fix * Fix saving index states * Hook fixes * Less logs * Migrations * Migrate demos * Cleanup * Finish migrations :( * Logging regression * pass reindex reason * Fix spawning indexes, refactor formattedlogger creation * Fix SQL hooks * Failed jobs raise exception in main loop * Bump * Bump * Bump * Force public schema
1 parent 566848d commit 937e932

File tree

142 files changed

+2653
-1777
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+2653
-1777
lines changed

poetry.lock

Lines changed: 291 additions & 251 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ black = "^20.8b1"
4747
bump2version = "^1.0.1"
4848
diff-cover = "^5.0.1"
4949
isort = "^5.7.0"
50-
mypy = "^0.812"
50+
mypy = "^0.900"
5151
pytest = "^3.0"
5252
pytest-cov = "^2.4"
5353
flake8 = "3.9.0"
5454
flakehell = "^0.9.0"
5555
testcontainers = "^3.4.1"
56+
types-tabulate = "^0.8.2"
57+
types-pytz = "^2021.1.2"
5658

5759
[tool.poetry.extras]
5860
pytezos = ["pytezos"]

src/demo_hic_et_nunc/dipdup-docker.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ database:
55
user: ${POSTGRES_USER:-dipdup}
66
password: ${POSTGRES_PASSWORD:-changeme}
77
database: ${POSTGRES_DB:-dipdup}
8-
schema_name: hic_et_nunc
98

109
hasura:
1110
url: http://hasura:8080

src/demo_hic_et_nunc/dipdup-local.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ database:
55
user: ${POSTGRES_USER:-dipdup}
66
password: ${POSTGRES_PASSWORD:-changeme}
77
database: ${POSTGRES_DB:-dipdup}
8-
schema_name: hic_et_nunc
98

109
hasura:
1110
url: http://127.0.0.1:8080

src/demo_hic_et_nunc/dipdup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
spec_version: 1.1
1+
spec_version: 1.2
22
package: demo_hic_et_nunc
33

44
database:

src/demo_hic_et_nunc/docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ services:
3030
retries: 5
3131

3232
hasura:
33-
image: hasura/graphql-engine:v2.0.4
33+
image: hasura/graphql-engine:v2.0.8
3434
ports:
3535
- 127.0.0.1:8080:8080
3636
depends_on:

src/demo_hic_et_nunc/handlers/on_configure.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/demo_hic_et_nunc/handlers/on_rollback.py

Lines changed: 0 additions & 6 deletions
This file was deleted.
File renamed without changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from dipdup.context import HookContext
2+
3+
4+
async def on_reindex(
5+
ctx: HookContext,
6+
) -> None:
7+
await ctx.execute_sql('on_reindex')

0 commit comments

Comments
 (0)