[Tile-serving] [openstreetmap/osm2pgsql] Improve the human readility of the `osm2pgsql-replication` (PR #1975)
Sarah Hoffmann
notifications at github.com
Mon Jun 19 15:42:03 UTC 2023
@lonvia commented on this pull request.
This is starting to become a bit too verbose for my taste but will let me be convinced by good arguments to the contrary.
I would say that I'm firmly against are approximate times but it looks like I let this pass already in a previous commit. :(
>
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.",
this -> This
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1975#pullrequestreview-1486491844
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1975/review/1486491844 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230619/35516ef1/attachment.htm>
More information about the Tile-serving
mailing list