[Tile-serving] [openstreetmap/osm2pgsql] Add a script for simple updating of a database (#1411)

Jochen Topf notifications at github.com
Fri Feb 5 09:59:25 UTC 2021


@joto commented on this pull request.



> +from osmium.replication.server import ReplicationServer
+from osmium.replication.utils import get_replication_header
+from osmium import WriteHandler
+
+LOG = logging.getLogger()
+
+def connect(args):
+    """ Create a connection from the given command line arguments.
+    """
+    return psycopg2.connect(dbname=args.database, user=args.username,
+                            host=args.host, port=args.port)
+
+
+def compute_database_date(conn, prefix):
+    """ Determine the date of the database from the newest object in the
+        data base.

"database"

-- 
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/1411#pullrequestreview-584185835
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210205/261e1738/attachment.htm>


More information about the Tile-serving mailing list