<commit_before>module CloudConductor
  module Updaters
    class Updater
      def initialize(cloud, environment)
        @cloud = cloud
        @environment = environment
      end

      def update
        @nodes = get_nodes(@environment)
        Log.info "Start updating environment(#{@environment.name}) on #{@cloud.name}"
        @environment.update_attribute(:status, :PROGRESS)

        update_infrastructure
        send_events(@environment)

        @environment.update_attribute(:status, :CREATE_COMPLETE)
        Log.info "Updated environment(#{@environment.name}) on #{@cloud.name}"
      rescue => e
        @environment.update_attribute(:status, :ERROR)
        Log.warn "Following errors have been occurred while creating environment(#{@environment.name}) on #{@cloud.name}"
        Log.warn e.message
        Log.debug e.backtrace
        raise
      end

      private

      def update_infrastructure
        # This method will be implemented on subclasses
        fail 'Unimplement method'
      end<commit_msg>Fix log message while updating environment<commit_after>module CloudConductor
  module Updaters
    class Updater
      def initialize(cloud, environment)
        @cloud = cloud
        @environment = environment
      end

      def update
        @nodes = get_nodes(@environment)
        Log.info "Start updating environment(#{@environment.name}) on #{@cloud.name}"
        @environment.update_attribute(:status, :PROGRESS)

        update_infrastructure
        send_events(@environment)

        @environment.update_attribute(:status, :CREATE_COMPLETE)
        Log.info "Updated environment(#{@environment.name}) on #{@cloud.name}"
      rescue => e
        @environment.update_attribute(:status, :ERROR)
        Log.warn "Following errors have been occurred while updating environment(#{@environment.name}) on #{@cloud.name}"
        Log.warn e.message
        Log.debug e.backtrace
        raise
      end

      private

      def update_infrastructure
        # This method will be implemented on subclasses
        fail 'Unimplement method'
      end
{'fraction_non_alphanumeric': 0.08903781713738632, 'fraction_numerical': 0.0, 'mean_word_length': 2.732142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5202831', 'n_tokens_mistral': 532, 'n_tokens_neox': 525, 'n_words': 144}