From c4560936a013b2e3570efa6267d7b5341e74f22c Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 8 Jan 2025 14:21:41 +0300 Subject: [PATCH] Use empty hash fallback when loading state file in replicate-changesets --- .../planet/files/default/replication-bin/replicate-changesets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/planet/files/default/replication-bin/replicate-changesets b/cookbooks/planet/files/default/replication-bin/replicate-changesets index c87183fbb..a57ca7659 100755 --- a/cookbooks/planet/files/default/replication-bin/replicate-changesets +++ b/cookbooks/planet/files/default/replication-bin/replicate-changesets @@ -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] -- 2.39.5