input-output-hk / hydra-tools

custom GitHub Checks integration for Hydra
0 stars 0 forks source link

Store state to disk and reload it on startup if necessary #3

Closed erikd closed 1 year ago

erikd commented 1 year ago

Both github-hydra-bridge and hydra-github-bridge have internal state which is currently lost during stop and restart.

This PR adds functionality to store the states to disk each time the state changes. The location of the stored state is specified by the HYDRA_STATE_DIR environment variable and the above two programs use different file name prefixes to avoid clobbering one another. If the HYDRA_STATE_DIR variable is not specified it defaults to the old behavior of the state not being stored to disk.