• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / tigerdata-app / cb4c988a-3863-4947-a39e-4f0b862ef172

08 Jan 2026 02:42PM UTC coverage: 90.762%. First build
cb4c988a-3863-4947-a39e-4f0b862ef172

push

circleci

web-flow
add pul_cache exception (#2344)

ref #2335

6 of 13 new or added lines in 1 file covered. (46.15%)

2977 of 3280 relevant lines covered (90.76%)

609.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

46.15
/app/services/pul_cache.rb
1
# frozen_string_literal: true
2

3
require "health_monitor/providers/cache"
2✔
4

5
class PULCacheException < StandardError; end
2✔
6

7
class PULCache < HealthMonitor::Providers::Cache
2✔
8
  def check!
2✔
NEW
9
    time = Time.now.utc.to_fs(:rfc2822)
×
10

NEW
11
    Rails.cache.write(key, time)
×
NEW
12
    fetched = Rails.cache.read(key)
×
13

14
    # NOTE: we might want to add logic to allow a small difference
15
    # here, but we let's not do this until we see if the issue persists
16
    # with this new implementation that calculates a better key.
NEW
17
    raise "different values (now: #{time}, fetched: #{fetched})" if fetched != time
×
18
  rescue RuntimeError => e
NEW
19
    raise PulCacheException, e.message
×
20
  end
21

22
    private
2✔
23

24
      def key
2✔
NEW
25
        random = rand(99_999)
×
NEW
26
        @key ||= ["health", request.try(:remote_ip), random].join(":")
×
27
      end
28
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc