[Rt-commit] rt branch, 4.4/improve-rt-externalize-attachments, repushed

Craig Kaiser craig at bestpractical.com
Thu Jan 18 10:45:55 EST 2018


The branch 4.4/improve-rt-externalize-attachments was deleted and repushed:
       was c499a87f7ebfd6939311cdfb60577e64f857b79e
       now 21de1f9e428f289e4cfd06125564d3363d7c899b

1: c499a87f7 ! 1: 21de1f9e4 Improve rt-externalize-attachments
    @@ -2,9 +2,8 @@
     
         Improve rt-externalize-attachments
         
    -    Support for 'attachments' flag that allows the number of attachments that will be
    -    processed to be specified. Add 'attachment_id' flag to submit a start ID, where
    -    attachments prior to the specified ID will be limited.
    +    Support for 'attachment_id' flag to submit a start ID, where
    +    attachments prior to the specified ID will not be externalized.
     
     diff --git a/sbin/rt-externalize-attachments.in b/sbin/rt-externalize-attachments.in
     --- a/sbin/rt-externalize-attachments.in
    @@ -13,7 +12,6 @@
          "age=s",
          "batchsize=s",
          "dry-run",
    -+    "attachments=s",
     +    "attachment_id=s",
      );
      
    @@ -22,7 +20,6 @@
          my $column = $class eq 'RT::Attachments' ? "Content" : "LargeContent";
          my $id = $last->{$class} || 0;
          my $batchsize = $opts{'batchsize'} || 1;
    -+    my $attachments = $opts{'attachments'} || 9999;
     +    my $attachment_id = $opts{'attachment_id'};
      
          while (1) {
    @@ -48,33 +45,21 @@
                  }
              }
     -
    -+            if ( $attach->Count >= $attachments && $attachments ) {
    -+                RT->Logger->info("Reached attachment limit.");
    -+                exit 2;
    -+            }
    -+        }
              last unless $attach->Count and $batchsize > 0;
          }
          $last->{$class} = $id;
     @@
    + Make a trial run and do no changes (mostly the same output as a real run is
      produced). C<dry-run> implies verbose output.
      
    - =back
    -+=item --attachments
    -+
    -+Provide the number of attachments you would like to process.
    -+
    -+=item --attachments
    -+
    -+Provide the number of attachments you would like to process.
     +
     +=item --attachment_id
     +
     +Provide a attachment ID to have as the starting point of the externalize.
     +
    -+=item --attachment_id
    + =back
    + 
     +
    -+Provide a attachment ID to have as the starting point of the externalize.
    - 
      =head1 SEE ALSO
      
    + L<RT_Config.html/External-storage>, L<RT::ExternalStorage>



More information about the rt-commit mailing list