Closed skwerlman closed 6 years ago
Thanks :)
I can't reproduce this at home, do you feel like to could indeed turn the constraint into an error by tweaking the changeset
function?
Also, can you try doing it again, starting from 07396c2 this time?
I haven't touched ecto before, but i'll give it a go.
If you can't repro it, it might be OS-related, since Arch linux has a some other unique problems with erlang (and, by extension, elixir)
@skwerlman I doubt it, it's too high-level. But I'm using OTP 20 and Elixir 1.5, with kerl and kiex, maybe try with those?
i'm using OTP 20.2 with elixir 1.5.3, direct from the arch repos.
Either way, i was able to fix it by adding this line at the end of Magnetissimo.Torrent.changeset
:
|> unique_constraint(:magnet, name: :torrents_magnet_index)
Again, i'm not super familiar with ecto, so this might not be the right way to solve it.
We'll see :) I'll merge that once I'm home, thank you again!
Using f0e20b639773e7919d25eeaf5989015f72119cca, GenServer terminates on the first duplicate torrent, before handling any other torrents in the queue. The scrapers are then restarted after only a few seconds, ignoring the intended 30min wait time.