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.11.0.rc2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.11.0.rc1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.10.0 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.9.2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.10.0.rc2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.10.0.rc1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.8.4 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.9.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.8.3 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.9.0 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.7.6 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.8.2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.9.0.rc2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.9.0.rc1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.8.1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.7.5 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.8.0 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.8.0.rc2 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.7.4 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
katello-4.8.0.rc1 app/lib/actions/helpers/smart_proxy_sync_history_helper.rb