class CrystalTask::Metrics::Redis
- CrystalTask::Metrics::Redis
- CrystalTask::Metrics::Base
- Reference
- Object
Defined in:
crystal_task/metrics/redis.crConstructors
Instance Method Summary
- #counts(metrics : Array(String)) : Hash(String, Int64)
- #decr(metric : String)
- #get_count(metric : String) : String | Nil
- #incr(metrics : Array(String))
- #pool : ::Redis::PooledClient
Instance methods inherited from class CrystalTask::Metrics::Base
counts(metrics : Array(String)) : Hash(String, Int64)
counts,
decr(metric : String)
decr,
get_count(metric : String) : String | Nil
get_count,
incr(metrics : Array(String))
incr
Constructor Detail
def self.new(hostname : String = ENV.fetch("REDIS_HOST", "127.0.0.1"), pool_size : Int64 = (ENV.fetch("REDIS_POOL_SIZE", (System.cpu_count > 5 ? System.cpu_count : 5).to_s)).to_i64)
#