Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
rrq / lib / rrq / scripts / lua / update_partition.lua
Size: Mime:
local queue_name = ARGV[1];
local partition  = ARGV[2];

local partitions_for_queue_key = 'rrq:queue:' .. queue_name .. ':all_partitions';
local added_partition = redis.call('sadd', partitions_for_queue_key, partition);

if added_partition == 1 then
  local active_partitions_key = 'rrq:queue:' .. queue_name .. ':active_partitions';
  redis.call('lpush', active_partitions_key, partition);
  redis.call('sadd', 'rrq:queues', queue_name);
end