[dw-free] Allow importing of your journal from another LiveJournal-based site.
[commit: http://hg.dwscoalition.org/dw-free/rev/ae827840b675]
http://bugs.dwscoalition.org/show_bug.cgi?id=114
Convert temporary fail to permanent fail after we run out of retries.
Patch by
exor674.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=114
Convert temporary fail to permanent fail after we run out of retries.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/DW/Worker/ContentImporter.pm
-------------------------------------------------------------------------------- diff -r de55581613d2 -r ae827840b675 cgi-bin/DW/Worker/ContentImporter.pm --- a/cgi-bin/DW/Worker/ContentImporter.pm Wed Mar 04 08:12:59 2009 +0000 +++ b/cgi-bin/DW/Worker/ContentImporter.pm Wed Mar 04 08:15:41 2009 +0000 @@ -258,6 +258,11 @@ sub temp_fail { sub temp_fail { my ( $class, $imp, $item, $job, $msgt, @args ) = @_; + # Check if we are out of failures + my $max_fails = $class->max_retries; + my $this_fail = $job->failures + 1; # Add this failure on. + return $class->fail( $imp, $item, $job, $msgt, @args ) if $this_fail >= $max_fails; + my $msg = sprintf( $msgt, @args ); warn "Temporary failure: $msg\n" if $LJ::IS_DEV_SERVER; --------------------------------------------------------------------------------