X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/60735f534585baea7c17d0320c22bb56f19ddabf..23399ca5a40b47ff871252a623339757e1442a0f:/cookbooks/planet/files/default/replication-bin/replicate-changesets diff --git a/cookbooks/planet/files/default/replication-bin/replicate-changesets b/cookbooks/planet/files/default/replication-bin/replicate-changesets index 9e1615147..a5312e1e6 100644 --- a/cookbooks/planet/files/default/replication-bin/replicate-changesets +++ b/cookbooks/planet/files/default/replication-bin/replicate-changesets @@ -141,8 +141,8 @@ end # replicated to a file. class Replicator def initialize(config) - @config = YAML.load(File.read(config)) - @state = YAML.load(File.read(@config["state_file"])) + @config = YAML.safe_load(File.read(config)) + @state = YAML.safe_load(File.read(@config["state_file"]), [Time]) @conn = PGconn.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]