You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running quickstart.sh, the output is redirected to a pipe.
When the output is not a terminal, awk uses block buffering.
As a result, the output from make import-sql is block-buffered and the progress is not clear, especially when dealing with a large data set or a less powerful machine.
For example, here is a snapshot of the output:
CREATE FUNCTION
Time: 1.935 ms
CREATE TRIGGER
Time: 2.219 ms
psql:/sql/parallel/water__wate
The last line is completed only when the next buffer is flushed:
CREATE FUNCTION
Time: 1.935 ms
CREATE TRIGGER
Time: 2.219 ms
psql:/sql/parallel/water__waterway.sql:525: NOTICE: trigger "trigger_store" for relation "osm_waterway_linestring" does not exist, skipping
The issue can be resolved by replacing
import-sql: all start-db-nowait
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools sh -c 'pgwait && import-sql'|\
awk -v s=": WARNING:"'$$0~s{print; print "\n*** WARNING detected, aborting"; exit(1)} 1'
with
import-sql: all start-db-nowait
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools sh -c 'pgwait && import-sql'|\
awk -v s=": WARNING:"'1{print; fflush()} $$0~s{print "\n*** WARNING detected, aborting"; exit(1)}'
The text was updated successfully, but these errors were encountered:
zstadler
added a commit
to zstadler/openmaptiles
that referenced
this issue
Aug 8, 2020
When running
quickstart.sh
, the output is redirected to a pipe.When the output is not a terminal,
awk
uses block buffering.As a result, the output from
make import-sql
is block-buffered and the progress is not clear, especially when dealing with a large data set or a less powerful machine.For example, here is a snapshot of the output:
The last line is completed only when the next buffer is flushed:
The issue can be resolved by replacing
with
The text was updated successfully, but these errors were encountered: