Replace PGconn with PG::Connection
authorTom Hughes <tom@compton.nu>
Mon, 16 Jul 2018 13:36:38 +0000 (14:36 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 16 Jul 2018 13:36:38 +0000 (14:36 +0100)
cookbooks/planet/files/default/replication-bin/replicate-changesets

index fac548bd5c2ef6dbdb573ac23e4d461c357d0a94..363d6040a4d7db9dd0ff9b80028d4e24567cfc7b 100755 (executable)
@@ -143,7 +143,7 @@ class Replicator
   def initialize(config)
     @config = YAML.safe_load(File.read(config))
     @state = YAML.safe_load(File.read(@config["state_file"]), [Time])
-    @conn = PGconn.connect(@config["db"])
+    @conn = PG::Connection.connect(@config["db"])
     # get current time from the database rather than the current system
     @now = @conn.exec("select now() as now").map { |row| Time.parse(row["now"]) }[0]
   end