[Tile-serving] [openstreetmap/osm2pgsql] add a 'status' command which prints the lag (& in JSON) (#1548)
Amanda
notifications at github.com
Wed Aug 18 09:51:04 UTC 2021
@amandasaurus commented on this pull request.
> + LOG.fatal(results['error']['text']['en'])
+ return results['error']['code']
+
+ LOG.info("Using replication service '%s'. Current sequence %d (%s).",
+ results['server']['base_url'], results['local']['sequence'], results['local']['timestamp'])
+ LOG.info("Server is at sequence %d (%s)", results['server']['sequence'], results['server']['timestamp'])
+ LOG.info("Server's most recent data is %s old", results['server']['age']['text']['en'])
+
+ if results['local']['sequence'] == results['server']['sequence']:
+ LOG.info("Database is up to date with server")
+ else:
+ LOG.info("Database is %d sequences behind, i.e. %s",
+ results['diff']['sequence'],
+ results['diff']['timestamp']['text']['en'])
+
+ LOG.info("Database's most recent data is %s old", results['local']['age']['text']['en'])
My apologies, I misunderstood you. I thought you were talking about the JSON. I have made the change you have requested.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1548#discussion_r691083188
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210818/dbff86e2/attachment.htm>
More information about the Tile-serving
mailing list