]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/planet/files/default/replication-bin/replicate-changesets
Add Time to whitelist of classes to load for YAML.safe_load
[chef.git] / cookbooks / planet / files / default / replication-bin / replicate-changesets
index 8c943902a8e91ad7d2869e9e8eb8182b429f7949..a5312e1e6d52344e755f304790a1f1fd604f0375 100644 (file)
@@ -142,7 +142,7 @@ end
 class Replicator
   def initialize(config)
     @config = YAML.safe_load(File.read(config))
-    @state = YAML.safe_load(File.read(@config["state_file"]))
+    @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]