Skip to content

Commit

Permalink
feat(download): Clarify downloader name in info logs
Browse files Browse the repository at this point in the history
It's often the case that multiple Pelias importers are run in a single
terminal simultaneously (for example, the `pelias/docker` setup does
this).

With that in mind, be more explicit about which importer log lines are
coming from can be helpful. This adds `whosonfirst-` to some relevant
WOF download log lines.
  • Loading branch information
orangejulius committed Sep 17, 2018
1 parent 2b477c3 commit 33b6db2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/sqlite_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ REMOTE_PATH="${REMOTE}/${DB_FILENAME}.bz2"
info() { echo -e "\e[33m[$1]\t\e[0m $2" >&2; }
err() { echo -e "\e[31m[$1]\t\e[0m \e[91m$2\e[0m" >&2; }
extract_file() {
info 'decompress' "${LOCAL_BZ2_PATH}"
info 'whosonfirst-sqlite-decompress' "${LOCAL_BZ2_PATH}"
bunzip2 -f "${LOCAL_BZ2_PATH}" > "${LOCAL_DB_PATH}"
}
generate_timestamp() {
Expand All @@ -45,7 +45,7 @@ download_handler() {
fi
}
download_sqlite_db() {
info 'download' "${REMOTE_PATH}"
info 'whosonfirst-sqlite-download' "${REMOTE_PATH}"
if [[ ! -f "${LOCAL_TS_PATH}" ]]; then
# first download
download_handler $(curl "${REMOTE_PATH}" \
Expand Down

0 comments on commit 33b6db2

Please sign in to comment.