Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 2.07 KB

hydra-processor.md

File metadata and controls

70 lines (49 loc) · 2.07 KB

Hydra Processor

Hydra Processor is a 'sink' tool used to fetch substrate events from a Hydra indexer. It sequentially applies the event handlers one by one in the order the events have been emitted.

Commands

hydra-processor migrate

undefined

USAGE
  $ hydra-processor migrate

OPTIONS
  -e, --env=env  [default: .env] Path to a file with environment variables

hydra-processor run

undefined

USAGE
  $ hydra-processor run

OPTIONS
  -e, --env=env            [default: .env] Path to a file with environment variables
  -m, --manifest=manifest  [default: manifest.yml] Manifest file
  --id=id                  ID of the processor (useful for multi-processor setups)
  --indexer=indexer        Indexer URL to source events

Quickstart

hydra-processor is driven by environment variables (loaded from .env file or supplied by a shell) and by settings from manifest.yml (by default, it looks up manifest.yml in the current folder).

Before the first run, the processor should set up auxiliary database tables required for its work:

hydra-processor migrate

Then processing may be started:

hydra-processor run

Environment variables

Variable Default Required Description
INDEXER_ENDPOINT_URL - Yes Hydra indexer endpoint to source the raw event and extrinsic data
DB_NAME - Yes Database name
DB_PORT - Yes Database port
DB_HOST - Yes Database host
DB_USER - Yes Database user
DB_PASS - Yes Database password
PROMETHEUS_PORT 3000 No A prometheus metrics endpoint is started at this port
POLL_INTERVAL_MS 1 sec (60000 msec) No How often the processor polls the indexer for new blocks

Manifest file

The manifest file describes which and how the events and extrinsics should be processed. See mappings for more details.