Sha256: c09b287d83d6a4f895711bccdc0931f8d80628195f3d987bcbae8a0b4e760243
Contents?: true
Size: 657 Bytes
Versions: 36
Compression:
Stored size: 657 Bytes
Contents
module QuickTravel class Status def self.key # NOTE: This is not pretty, but we need to use a unique key per server @key ||= "status-check##{SecureRandom.hex}" end def self.check! # Test Cache QuickTravel::Cache.delete(key) QuickTravel::Cache.cache(key) { 'start' } unless QuickTravel::Cache.cache(key) == 'start' fail RuntimeError, 'Failed to cache status-check' end QuickTravel::Cache.delete(key) QuickTravel::Cache.cache(key) { nil } unless QuickTravel::Cache.cache(key) == nil fail RuntimeError, 'Failed to clear status-check cache' end end end end
Version data entries
36 entries across 36 versions & 1 rubygems