Skip to content

Commit

Permalink
feat(BUX-422): env name cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba-4chain committed Jan 3, 2024
1 parent 732a3df commit 76fbbae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type DbConfig struct {
Type DbType `mapstructure:"type"`
SchemaPath string `mapstructure:"schema_path"`
Dsn string `mapstructure:"dsn"`
FilePath string `mapstructure:"db_file_path"`
FilePath string `mapstructure:"file_path"`
PreparedDb bool `mapstructure:"prepared_db"`
PreparedDbFilePath string `mapstructure:"prepared_db_file_path"`
}
Expand Down
8 changes: 4 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export PRELOADED_DB_URL=${PRELOADED_DB_URL:? 'URL to download preloaded db is not set. Exiting.'}
export PULSE_DB_PREPARED_DB=false
export PULSE_DB_DB_FILE_PATH=${PULSE_DB_DB_FILE_PATH:-'./data/blockheaders.db'}
export PULSE_DB_FILE_PATH=${PULSE_DB_FILE_PATH:-'./data/blockheaders.db'}
export PULSE_DB_PREPARED_DB_FILE_PATH=${PULSE_DB_PREPARED_DB_FILE_PATH:-'./data/blockheaders.csv.gz'}
preloaded=false
clean=false
Expand All @@ -20,9 +20,9 @@ function about() {
}

function clean_db() {
if [[ -e $PULSE_DB_DB_FILE_PATH ]]; then
if [[ -e $PULSE_DB_FILE_PATH ]]; then
echo "Cleaning existing database"
rm $PULSE_DB_DB_FILE_PATH
rm $PULSE_DB_FILE_PATH
fi
if [[ -e $PULSE_DB_PREPARED_DB_FILE_PATH ]]; then
echo "Cleaning existing preloaded database archive"
Expand All @@ -31,7 +31,7 @@ function clean_db() {
}

function preload() {
if [[ -e $PULSE_DB_DB_FILE_PATH ]]; then
if [[ -e $PULSE_DB_FILE_PATH ]]; then
echo "There is database file. Skipping preloading database."
echo "If you want to remove this existing database and use preloaded one, then use the '--clean' argument."
export PULSE_DB_PREPARED_DB=false
Expand Down

0 comments on commit 76fbbae

Please sign in to comment.