Sha256: 0994ae703cffe3834d929f417e13e492b99c4c477e73267a6a2f73609f8c3dfc

Contents?: true

Size: 325 Bytes

Versions: 4

Compression:

Stored size: 325 Bytes

Contents

module Shipit
  module GithubStatus
    CACHE_KEY = 'github::status'.freeze

    class << self
      def status
        Rails.cache.read(CACHE_KEY)
      end

      def refresh_status
        Rails.cache.write(CACHE_KEY, Shipit.github.api_status)
      rescue Faraday::Error, Octokit::ServerError
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shipit-engine-0.31.0 app/models/shipit/github_status.rb
shipit-engine-0.30.0 app/models/shipit/github_status.rb
shipit-engine-0.29.0 app/models/shipit/github_status.rb
shipit-engine-0.28.1 app/models/shipit/github_status.rb