<commit_before>local queue = KEYS[1]
local maxBatchSize = tonumber(ARGV[1])
local processingTimeout = tonumber(ARGV[2])
local queueKey = '{' .. queue .. '}:messages'
local processingKey = '{' .. queue .. '}:processing'
local messages = {}
while maxBatchSize > 0 do
  maxBatchSize = maxBatchSize - 1
  local id = redis.call('RPOPLPUSH', queueKey, processingKey)
  if not id then return messages end
  local messageKey = queueKey .. ':' .. id
  local messageProcessingKey = messageKey .. ':processing'
  local message = redis.call('GET', messageKey)
  table.insert(messages, message)
  redis.call('PSETEX', messageProcessingKey, processingTimeout, 1)
end
return messages<commit_msg>Clean up if statement<commit_after>local queue = KEYS[1]
local maxBatchSize = tonumber(ARGV[1])
local processingTimeout = tonumber(ARGV[2])
local queueKey = '{' .. queue .. '}:messages'
local processingKey = '{' .. queue .. '}:processing'
local messages = {}
while maxBatchSize > 0 do
  maxBatchSize = maxBatchSize - 1
  local id = redis.call('RPOPLPUSH', queueKey, processingKey)
  if not id then
    return messages
  end
  local messageKey = queueKey .. ':' .. id
  local messageProcessingKey = messageKey .. ':processing'
  local message = redis.call('GET', messageKey)
  table.insert(messages, message)
  redis.call('PSETEX', messageProcessingKey, processingTimeout, 1)
end
return messages
{'fraction_non_alphanumeric': 0.12663755458515283, 'fraction_numerical': 0.008733624454148471, 'mean_word_length': 4.635245901639344, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3049482', 'n_tokens_mistral': 418, 'n_tokens_neox': 409, 'n_words': 120}