Skip to content

Commit

Permalink
hasher_recheck: drop torrents that fail a recheck (NXDOMAIN)
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed Nov 19, 2017
1 parent 651b390 commit 9f00b6a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/hasher/src/hasher_recheck.erl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ loop() ->
model_enclosures:set_torrent(
URL, list_to_binary(io_lib:format("HTTP ~B", [HttpStatus])), <<"">>, null, null, null);

{error, {nxdomain, _Reason}} ->
io:format("Recheck ~s failed on DNS~n", [URL]),

%% We've got an HTTP code, meaning the network is
%% up but the URL has disappeared!
model_enclosures:set_torrent(
URL, <<"NXDOMAIN">>, <<"">>, null, null, null);

{error, E} ->
io:format("Recheck ~s failed:~n~p~n", [URL, E])

Expand Down

0 comments on commit 9f00b6a

Please sign in to comment.