[Tile-serving] [openstreetmap/osm2pgsql] add an 'info' command which prints the lag (& in JSON) (#1548)
Amanda
notifications at github.com
Tue Aug 17 10:49:48 UTC 2021
> I would like to discuss the JSON output
How about this for an output format?
```{
"server": {
"base_url": "https://download.geofabrik.de/europe-updates/",
"sequence": 3052,
"timestamp": "2021-08-03T20:21:39Z",
"age_sec": 64920
},
"local": {
"sequence": 3052,
"timestamp": "2021-08-03T20:21:39Z",
"age_sec": 64920
}
}
```
I prefer `age_secs` rather than just `age`, so that people will know the units (seconds) without having to look it up. Someone might think the `age` is the age in sequence numbers (for example).
`timestamp` is the timestamp of the server/local db, and `age_sec` is the difference between that timestamp, and now. This does mean `age_sec` is duplicating information that could be derived from the `timestamp` field. However given that parsing ISO timestamps & doing date diffs takes a little more than zero work, I think it is beneficial for the user to do the work in the `status` command.
If that output format is OK, I can implement it.
--
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#issuecomment-900191252
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210817/5ec6aa99/attachment.htm>
More information about the Tile-serving
mailing list