Sha256: 8580c2f4c20bafaec935012a618ca56e2ccd072bd3eaa813c4d82b5bfbaddc00

Contents?: true

Size: 689 Bytes

Versions: 113

Compression:

Stored size: 689 Bytes

Contents

module Actions
  module Helpers
    module SmartProxySyncHistoryHelper
      def self.included(base)
        base.middleware.use ::Actions::Middleware::RecordSmartProxySyncHistory
      end

      def done?
        is_done = super
        if is_done
          ::Katello::SmartProxySyncHistory.where(:id => output[:smart_proxy_history_id], :finished_at => nil).update_all(finished_at: Time.now)
        end
        is_done
      end

      def rescue_external_task(error)
        if output[:smart_proxy_history_id]
          ::Katello::SmartProxySyncHistory.where(:id => output[:smart_proxy_history_id], :finished_at => nil).delete_all
        end
        super
      end
    end
  end
end

Version data entries

113 entries across 113 versions & 1 rubygems

Version Path
katello-4.8.0.rc1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.7.3 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.7.2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.7.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.6.2.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.6.2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.7.0 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.6.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.7.0.rc2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.7.0.rc1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.4.2.2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.4.2.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.4.2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.5.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.6.0 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.6.0.rc2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.6.0.rc1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.5.0 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.5.0.rc2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.4.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb