hirosystems / ordhook

Build indexers, standards and protocols on top of Ordinals and Inscriptions (BRC20, etc).
Apache License 2.0
182 stars 54 forks source link

feat: support a separate storage directory for observers.sqlite #354

Closed rafaelcr closed 1 week ago

rafaelcr commented 1 month ago

Allows configuring a separate storage directory for observers.sqlite so state data can live separately and observer configuration is not reflected in data snapshots that might be moved to different environments.

In the config .toml file, this is now controlled by the observers_working_dir value:

[storage]
working_dir = "tmp"
observers_working_dir = "observers"

Additional work:

Fixes #274

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 57.61589% with 64 lines in your changes missing coverage. Please review. Files with missing lines Patch % Lines
components/ordhook-core/src/service/http_api.rs 60.86% 45 Missing :warning:
components/ordhook-core/src/service/mod.rs 0.00% 10 Missing :warning:
components/ordhook-core/src/service/observers.rs 75.00% 3 Missing :warning:
components/ordhook-cli/src/cli/mod.rs 0.00% 2 Missing :warning:
components/ordhook-core/src/download/mod.rs 0.00% 2 Missing :warning:
components/ordhook-core/src/scan/bitcoin.rs 0.00% 1 Missing :warning:
components/ordhook-core/src/service/runloops.rs 0.00% 1 Missing :warning:

:loudspeaker: Thoughts on this report? Let us know!