mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-03-04 08:15 am

[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 [personal profile] exor674.

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;
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org