[Tile-serving] [openstreetmap/osm2pgsql] Improve the human readility of the `osm2pgsql-replication` (PR #1975)
Jochen Topf
notifications at github.com
Mon Jun 19 18:06:12 UTC 2023
@joto commented on this pull request.
>
if args.once:
break
+
+ update_duration_sec = (dt.datetime.now(dt.timezone.utc) - update_started).total_seconds()
+ with conn.cursor() as cur:
+ cur.execute(sql.SQL('SELECT * FROM {}').format(args.table))
+ if cur.rowcount != 1:
+ LOG.fatal("Updates not set up correctly. Run 'osm2pgsql-updates init' first.")
+ return 1
+
+ _base_url, _seq, current_local_timestamp = cur.fetchone()
+
+ total_applied_changes_duration_sec = (current_local_timestamp - initial_local_timestamp).total_seconds()
+ LOG.info("It took %s (%d sec) to apply %s (%d sec) of changes. this is a speed of ×%.1f.",
Maybe the first three lines can be rolled into one: `Applying sequence number 5619810 to 5619815 (2023-06-15T09:42Z to 2023-06-15T09:47Z)`
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1975#discussion_r1234327326
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1975/review/1486653071 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230619/8bd06f03/attachment.htm>
More information about the Tile-serving
mailing list