]> git.openstreetmap.org Git - chef.git/commitdiff
Update YAML.safe_load arguments in replicate-changesets
authorAnton Khorev <tony29@yandex.ru>
Wed, 8 Jan 2025 09:46:40 +0000 (12:46 +0300)
committerAnton Khorev <tony29@yandex.ru>
Wed, 8 Jan 2025 09:46:40 +0000 (12:46 +0300)
cookbooks/planet/files/default/replication-bin/replicate-changesets

index 0c53856d984f1aae58f754cc10a135ba8db27d83..c87183fbb1a54969660497a4a1c0b33e358ff9a9 100755 (executable)
@@ -139,7 +139,7 @@ end
 class Replicator
   def initialize(config)
     @config = YAML.safe_load(File.read(config))
-    @state = YAML.safe_load(File.read(@config["state_file"]), [Time])
+    @state = YAML.safe_load(File.read(@config["state_file"]), :permitted_classes => [Time])
     @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]