<commit_before>module SaveEngineConfiguration
  def save_engine_built_configuration(mc)
    write_actionators(mc, @blueprint_reader.actionators)
    write_schedules(mc, @blueprint_reader.schedules) if @blueprint_reader.respond_to?(:schedules)
    write_services(mc, @service_builder.attached_services)
    write_variables(mc, @blueprint_reader.environments)
  end

  def write_schedules(container, schedules)
    return true if schedules.nil?
    FileUtils.mkdir_p(ContainerStateFiles.schedules_dir(container)) unless Dir.exist?(ContainerStateFiles.schedules_dir(container))
    serialized_object = YAML.dump(schedules)
    f = File.new(ContainerStateFiles.schedules_file(container), File::CREAT | File::TRUNC | File::RDWR, 0644)
    f.puts(serialized_object)
    f.flush()
    f.close<commit_msg>save schedule properly<commit_after>module SaveEngineConfiguration
  def save_engine_built_configuration(mc)
    write_actionators(mc, @blueprint_reader.actionators)
    write_schedules(mc, @blueprint_reader.schedules) if @blueprint_reader.respond_to?(:schedules)
    write_services(mc, @service_builder.attached_services)
    write_variables(mc, @blueprint_reader.environments)
  end

  def write_schedules(container, schedules)
    return true if schedules.nil?
    FileUtils.mkdir_p(ContainerStateFiles.schedules_dir(container)) unless Dir.exist?(ContainerStateFiles.schedules_dir(container))
    serialized_object = YAML.dump(schedules)
    f = File.new(ContainerStateFiles.schedules_file(container), File::CREAT | File::TRUNC | File::RDWR, 0644)
    f.write(serialized_object)
    f.flush()
    f.close
{'fraction_non_alphanumeric': 0.09600997506234414, 'fraction_numerical': 0.004987531172069825, 'mean_word_length': 6.465116279069767, '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': '2558880', 'n_tokens_mistral': 510, 'n_tokens_neox': 495, 'n_words': 73}