<commit_before>
module Dyndnsd
  module Updater
    class CommandWithBindZone
      def initialize(domain, config)
        @zone_file = config['zone_file']
        @command = config['command']
        @generator = Generator::Bind.new(domain, config)
      end

      def update(zone)
        Helper.span('updater_update') do |span|
          span.set_tag('dyndnsd.updater.name', self.class.name.split('::').last)

          # write zone file in bind syntax
          File.open(@zone_file, 'w') { |f| f.write(@generator.generate(zone)) }
          # call user-defined command
          pid = fork do
            exec @command
          end

          # detach so children don't become zombies
          Process.detach(pid)
        end
      end
    end
  end
end<commit_msg>updater: rename parameter to match expected type<commit_after>
module Dyndnsd
  module Updater
    class CommandWithBindZone
      def initialize(domain, config)
        @zone_file = config['zone_file']
        @command = config['command']
        @generator = Generator::Bind.new(domain, config)
      end

      def update(db)
        Helper.span('updater_update') do |span|
          span.set_tag('dyndnsd.updater.name', self.class.name.split('::').last)

          # write zone file in bind syntax
          File.open(@zone_file, 'w') { |f| f.write(@generator.generate(db)) }
          # call user-defined command
          pid = fork do
            exec @command
          end

          # detach so children don't become zombies
          Process.detach(pid)
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10336081166772353, 'fraction_numerical': 0.0, 'mean_word_length': 2.124752475247525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1681742', 'n_tokens_mistral': 464, 'n_tokens_neox': 457, 'n_words': 117}