Chatwoot/db/migrate/20170525104650_create_round_robin.rb
Tianlu a260495f3d
Chore: dup module name RoundRobin (#1036)
Fix the duplicate module name in migration
2020-07-14 20:16:03 +05:30

8 lines
265 B
Ruby

class CreateRoundRobin < ActiveRecord::Migration[5.0]
def change
InboxMember.find_each do |im|
round_robin_key = format(::Redis::Alfred::ROUND_ROBIN_AGENTS, inbox_id: im.inbox_id)
Redis::Alfred.lpush(round_robin_key, im.user_id)
end
end
end