Chatwoot/db/migrate/20170525104650_round_robin.rb
2019-10-20 14:17:26 +05:30

8 lines
264 B
Ruby

class RoundRobin < ActiveRecord::Migration[5.0]
def change
InboxMember.find_each do |im|
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