Chatwoot/db/migrate/20170525104650_round_robin.rb

9 lines
264 B
Ruby
Raw Normal View History

class RoundRobin < ActiveRecord::Migration[5.0]
def change
InboxMember.find_each do |im|
2019-10-20 08:47:26 +00:00
round_robin_key = format(Constants::RedisKeys::ROUND_ROBIN_AGENTS, inbox_id: im.inbox_id)
Redis::Alfred.lpush(round_robin_key, im.user_id)
end
end
end