Class: SidekiqUniqueJobs::Redis::List
- Defined in:
- lib/sidekiq_unique_jobs/redis/list.rb
Overview
Class List provides convenient access to redis hashes
Instance Attribute Summary
Attributes inherited from Entity
Instance Method Summary collapse
-
#count ⇒ Integer
The number of entries in this list.
-
#entries ⇒ Array<Object>
Entries in this list.
Methods inherited from Entity
#exist?, #expires?, #initialize, #pttl, #ttl
Methods included from Timing
clock_stamp, now_f, time_source, timed
Methods included from JSON
dump_json, load_json, safe_load_json
Methods included from Script::Caller
call_script, debug_lua, do_call, extract_args, max_history, normalize_argv, now_f, redis_version
Methods included from Logging
#build_message, included, #log_debug, #log_error, #log_fatal, #log_info, #log_warn, #logger, #logging_context, #with_configured_loggers_context, #with_logging_context
Constructor Details
This class inherits a constructor from SidekiqUniqueJobs::Redis::Entity
Instance Method Details
#count ⇒ Integer
The number of entries in this list
27 28 29 |
# File 'lib/sidekiq_unique_jobs/redis/list.rb', line 27 def count redis { |conn| conn.llen(key) } end |
#entries ⇒ Array<Object>
Entries in this list
17 18 19 |
# File 'lib/sidekiq_unique_jobs/redis/list.rb', line 17 def entries redis { |conn| conn.lrange(key, 0, -1) } end |