Skip to content

feat: persist data to disk #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2023
Merged

feat: persist data to disk #18

merged 1 commit into from
Aug 9, 2023

Conversation

agaffney
Copy link
Contributor

@agaffney agaffney commented Aug 8, 2023

Fixes #6

@agaffney
Copy link
Contributor Author

agaffney commented Aug 8, 2023

$ ./chnsd 
{"level":"info","timestamp":"2023-08-08T17:45:20-05:00","caller":"indexer/indexer.go:81","msg":"starting new chainsync at configured location: 34255089, a35a0d216e00c64c257e41089138f4d22be721281d73f2ab8ef61ca8863d04a0"}
{"level":"info","timestamp":"2023-08-08T17:45:21-05:00","caller":"chnsd/main.go:72","msg":"starting DNS listener on :8053"}
{"level":"info","timestamp":"2023-08-08T17:45:21-05:00","caller":"indexer/indexer.go:154","msg":"found updated registration for domain: snorkel.cardano"}
{"level":"info","timestamp":"2023-08-08T17:45:24-05:00","caller":"indexer/indexer.go:154","msg":"found updated registration for domain: dolphin.cardano"}
^C
$ ./chnsd 
{"level":"info","timestamp":"2023-08-08T17:45:34-05:00","caller":"indexer/indexer.go:64","msg":"found previous chainsync cursor: 34255785, 0acafd824cef0283cb94a62a0e77c7d0ca88c23f53ee5c74e512ff38c14321f8"}
{"level":"info","timestamp":"2023-08-08T17:45:34-05:00","caller":"chnsd/main.go:72","msg":"starting DNS listener on :8053"}

@agaffney agaffney force-pushed the feat/persist-data branch from 67c5d20 to d3660fd Compare August 8, 2023 22:49
@@ -85,6 +90,9 @@ var globalConfig = &Config{
Indexer: IndexerConfig{
Network: "preprod",
},
State: StateConfig{
Directory: "./.state",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will dump a state directory wherever this is executed. This is fine, for now, but we really should put this somewhere better... ${HOME}/.cache/chnsd/state?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm definitely open to a better default location for this

@agaffney agaffney merged commit a620815 into main Aug 9, 2023
@agaffney agaffney deleted the feat/persist-data branch August 9, 2023 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Persist indexer data to disk
2 participants