Sha256: 260615356a286596f37227d8a8966f7a97fe79924dee3b5601b3b93beb54cce7

Contents?: true

Size: 1.11 KB

Versions: 14

Compression:

Stored size: 1.11 KB

Contents

# frozen_string_literal: true

module RedisWebManager
  module ClientsHelper
    def age(value)
      time_ago_in_words(Time.now - value.seconds).humanize
    end

    def flags(value)
      {
        A: 'Connection to be closed ASAP',
        b: 'The client is waiting in a blocking operation',
        c: 'Connection to be closed after writing entire reply',
        d: 'A watched keys has been modified - EXEC will fail',
        i: 'The client is waiting for a VM I/O (deprecated)',
        M: 'The client is a master',
        N: 'No specific flag set',
        O: 'The client is a client in MONITOR mode',
        P: 'The client is a Pub/Sub subscriber',
        r: 'The client is in readonly mode against a cluster node',
        S: 'The client is a replica node connection to this instance',
        u: 'The client is unblocked',
        U: 'The client is connected via a Unix domain socket',
        X: 'The client is in a MULTI/EXEC context'
      }[value.to_sym]
    end

    def events(value)
      {
        r: 'The client socket is readable',
        w: 'The client socket is writable'
      }[value.to_sym]
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
redis_web_manager-0.4.0 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.3.9 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.3.8 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.3.6 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.3.5 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.3.4 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.3.3 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.3.2 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.3.1 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.3.0 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.2.1 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.2.0 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.1.8 app/helpers/redis_web_manager/clients_helper.rb
redis_web_manager-0.1.6 app/helpers/redis_web_manager/clients_helper.rb