Sha256: 8580c2f4c20bafaec935012a618ca56e2ccd072bd3eaa813c4d82b5bfbaddc00

Contents?: true

Size: 689 Bytes

Versions: 112

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

112 entries across 112 versions & 1 rubygems

Version Path
katello-4.14.2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.15.0 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.15.0.rc2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.15.0.rc1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.14.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.14.0 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.14.0.rc3 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.14.0.rc2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.14.0.rc1.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.14.0.rc1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.13.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.13.0 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.12.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.13.0.rc1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.12.0 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.12.0.rc3 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.12.0.rc2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.12.0.rc1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.11.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.11.0 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb