20200802170532_fix_legacy_tags: chunk the user query

This commit is contained in:
rinpatch 2020-08-07 22:10:09 +03:00
parent a818587467
commit 15fa3b6bd8
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ def change do
where: fragment("? && ?", u.tags, ^legacy_tags),
select: struct(u, [:tags, :id])
)
|> Repo.all()
|> Repo.chunk_stream(100)
|> Enum.each(fn user ->
fix_tags_changeset(user)
|> Repo.update()