X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/29e2c1a969f226660eac316bd713c0c8c31e9133..3842b457f8c47904305387c679896e750f521929:/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 fb3d6138a..45e1a4a1c 100644 --- a/cookbooks/planet/files/default/replication-bin/replicate-changesets +++ b/cookbooks/planet/files/default/replication-bin/replicate-changesets @@ -196,10 +196,12 @@ class Replicator FileUtils.mkdir_p(File.dirname(data_file)) Zlib::GzipWriter.open(tmp_data) do |fh| fh.write(changeset_dump(open_changesets)) + fh.fdatasync end @state["sequence"] = sequence File.open(tmp_state, "w") do |fh| fh.write(YAML.dump(@state)) + fh.fdatasync end # sanity check: the files we're moving into place