From abbc763382c0d50b8bef0670913d02d2585ca0d0 Mon Sep 17 00:00:00 2001 From: Ryan Lambert Date: Wed, 18 Jan 2023 20:31:48 -0700 Subject: [PATCH] Fix reported osm_date when osm2pgsql-replication updates data --- docker/pgosm_flex.py | 4 ++++ docs/DOCKER-RUN.md | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker/pgosm_flex.py b/docker/pgosm_flex.py index 8073850..a3d22f0 100644 --- a/docker/pgosm_flex.py +++ b/docker/pgosm_flex.py @@ -123,6 +123,10 @@ def run_pgosm_flex(ram, region, subregion, data_only, debug, import_mode=import_mode) if import_mode.replication_update: + # If replication_update, a manual date is not valid. + # Always setting this here is an easy way to enforce. + pgosm_date = helpers.get_today() + os.environ['PGOSM_DATE'] = pgosm_date logger.info('Running osm2pgsql-replication in update mode') logger.warning('Replication mode is Experimental (getting closer!)') success = run_replication_update(skip_nested=skip_nested, diff --git a/docs/DOCKER-RUN.md b/docs/DOCKER-RUN.md index 73e6b56..991c411 100644 --- a/docs/DOCKER-RUN.md +++ b/docs/DOCKER-RUN.md @@ -375,8 +375,8 @@ docker exec -it \ --ram=8 \ --region=north-america/us \ --subregion=district-of-columbia \ - --pgosm-date 2022-02-22 \ - --replication --skip-dump + --pgosm-date 2022-12-30 \ + --replication ``` Running the above command a second time will detect that the target database