]> git.openstreetmap.org Git - chef.git/commitdiff
Merge remote-tracking branch 'github/pull/724'
authorTom Hughes <tom@compton.nu>
Thu, 9 Jan 2025 20:40:03 +0000 (20:40 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 9 Jan 2025 20:40:03 +0000 (20:40 +0000)
cookbooks/planet/files/default/replication-bin/replicate-changesets

index c87183fbb1a54969660497a4a1c0b33e358ff9a9..a57ca7659e42beacae9e884fb61a9cf758b56ae4 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"]), :permitted_classes => [Time])
+    @state = YAML.safe_load(File.read(@config["state_file"]), :permitted_classes => [Time], :fallback => {})
     @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]