| 
      
            Lines 110-118
          my $completed = 0;
      
      
        Link Here
      
     | 
  
        
          | 110 | 
          # if we haven't completed the batch in two minutes, it's not happening  | 
          110 | 
          # if we haven't completed the batch in two minutes, it's not happening  | 
        
        
          | 111 | 
          for my $counter ( 1 .. 24 ) { | 
          111 | 
          for my $counter ( 1 .. 24 ) { | 
        
        
          | 112 | 
              $agent->get(  | 
          112 | 
              $agent->get(  | 
        
          
            
              | 113 | 
                      "$intranet/cgi-bin/koha/tools/background-job-progress.pl?jobID=$jobID",  | 
              113 | 
                      "$intranet/cgi-bin/koha/tools/background-job-progress.pl?jobID=$jobID"  | 
            
            
              | 114 | 
                      "get job progress"  | 
              114 | 
                  ); # get job progress  | 
            
            
              | 115 | 
                  );  | 
               | 
               | 
            
        
          | 116 | 
              $jsonresponse = decode_json $agent->content();  | 
          115 | 
              $jsonresponse = decode_json $agent->content();  | 
        
        
          | 117 | 
              if ( $jsonresponse->{'job_status'} eq 'completed' ) { | 
          116 | 
              if ( $jsonresponse->{'job_status'} eq 'completed' ) { | 
        
        
          | 118 | 
                  $completed = 1;  | 
          117 | 
                  $completed = 1;  | 
        
            
              | 119 | 
              -   | 
               | 
               |