module RRRSpec::ActiveTaskset

Constants

ACTIVE_TASKSET_KEY

Public Class Methods

add(taskset) click to toggle source

Public: Add the taskset to the active tasksets

# File lib/rrrspec/redis_models.rb, line 118
def self.add(taskset)
  RRRSpec.redis.rpush(ACTIVE_TASKSET_KEY, taskset.key)
end
all_tasksets_of(rsync_name) click to toggle source

Public: Returns an array of the active tasksets whose rsync name is specified one.

# File lib/rrrspec/redis_models.rb, line 136
def self.all_tasksets_of(rsync_name)
  list.select { |taskset| taskset.rsync_name == rsync_name }
end
list() click to toggle source

Public: Returns an array of the active tasksets.

# File lib/rrrspec/redis_models.rb, line 128
def self.list
  RRRSpec.redis.lrange(ACTIVE_TASKSET_KEY, 0, -1).map do |key|
    Taskset.new(key)
  end
end
remove(taskset) click to toggle source

Public: Remove the taskset from the active tasksets

# File lib/rrrspec/redis_models.rb, line 123
def self.remove(taskset)
  RRRSpec.redis.lrem(ACTIVE_TASKSET_KEY, 0, taskset.key)
end