Subversion Repositories locum

Rev

Rev 149 | Rev 159 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 149 Rev 152
Line 178... Line 178...
178
          if (in_array($bkey, $valid_vals)) { $bib_values[$bkey] = $bval; }
178
          if (in_array($bkey, $valid_vals)) { $bib_values[$bkey] = $bval; }
179
        }
179
        }
180
       
180
       
181
        $bib_values['subjects_ser'] = serialize($subj);
181
        $bib_values['subjects_ser'] = serialize($subj);
182
     
182
     
183
        $types = array('date', 'date', 'date', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'text', 'text', 'integer', 'text', 'text', 'text', 'integer', 'text');
183
        $types = array('date', 'date', 'date', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'text', 'text', 'integer', 'text', 'text', 'text', 'text');
184
   
184
   
185
        $setlist =
185
        $setlist =
186
          "bib_created = :bib_created, " .
186
          "bib_created = :bib_created, " .
187
          "bib_lastupdate = :bib_lastupdate, " .
187
          "bib_lastupdate = :bib_lastupdate, " .
188
          "bib_prevupdate = :bib_prevupdate, " .
188
          "bib_prevupdate = :bib_prevupdate, " .
Line 396... Line 396...
396
    $limit = 1000;
396
    $limit = 1000;
397
    $offset = 0;
397
    $offset = 0;
398
   
398
   
399
    parent::putlog("Collecting current data keys ..");
399
    parent::putlog("Collecting current data keys ..");
400
    $db = MDB2::connect($this->dsn);
400
    $db = MDB2::connect($this->dsn);
401
    $sql = "SELECT bnum, bib_lastupdate FROM locum_facet_heap ORDER BY bnum LIMIT $limit";
401
    $sql = "SELECT bnum, bib_lastupdate FROM locum_bib_items WHERE active = '1' ORDER BY bnum LIMIT $limit";
402
    $init_result = $db->query($sql);
402
    $init_result = $db->query($sql);
403
    $init_bib_arr = $init_result->fetchAll(MDB2_FETCHMODE_ASSOC);
403
    $init_bib_arr = $init_result->fetchAll(MDB2_FETCHMODE_ASSOC);
404
   
404
   
405
    while(!empty($init_bib_arr)) {
405
    while(!empty($init_bib_arr)) {
406
      $num_children = $this->locum_config['harvest_config']['max_children'];
406
      $num_children = $this->locum_config['harvest_config']['max_children'];
Line 456... Line 456...
456
      }
456
      }
457
     
457
     
458
      $offset = $offset + $limit;
458
      $offset = $offset + $limit;
459
      parent::putlog("Collecting current data keys starting at $offset");
459
      parent::putlog("Collecting current data keys starting at $offset");
460
      $db = MDB2::connect($this->dsn);
460
      $db = MDB2::connect($this->dsn);
461
      $sql = "SELECT bnum, bib_lastupdate FROM locum_facet_heap ORDER BY bnum LIMIT $limit OFFSET $offset";
461
      $sql = "SELECT bnum, bib_lastupdate FROM locum_bib_items WHERE active = '1' ORDER BY bnum LIMIT $limit OFFSET $offset";
462
      $init_result = $db->query($sql);
462
      $init_result = $db->query($sql);
463
      $init_bib_arr = $init_result->fetchAll(MDB2_FETCHMODE_ASSOC);
463
      $init_bib_arr = $init_result->fetchAll(MDB2_FETCHMODE_ASSOC);
464
    }
464
    }
465
  }
465
  }
466
 
466
 
Line 480... Line 480...
480
    $limit = 1000;
480
    $limit = 1000;
481
    $offset = 0;
481
    $offset = 0;
482
 
482
 
483
    parent::putlog("Collecting current data keys ..");
483
    parent::putlog("Collecting current data keys ..");
484
    $db = MDB2::connect($this->dsn);
484
    $db = MDB2::connect($this->dsn);
485
    $sql = "SELECT bnum, bib_lastupdate FROM locum_facet_heap ORDER BY bnum LIMIT $limit";
485
    $sql = "SELECT bnum, bib_lastupdate FROM locum_bib_items WHERE active = '1' ORDER BY bnum LIMIT $limit";
486
    $init_result = $db->query($sql);
486
    $init_result = $db->query($sql);
487
    $init_bib_arr = $init_result->fetchAll(MDB2_FETCHMODE_ASSOC);
487
    $init_bib_arr = $init_result->fetchAll(MDB2_FETCHMODE_ASSOC);
488
    $locumclient = new locum_client;
488
    $locumclient = new locum_client;
489
   
489
   
490
    while(!empty($init_bib_arr)) {
490
    while(!empty($init_bib_arr)) {
Line 540... Line 540...
540
        // TODO - Bib verification for those poor saps w/o pcntl
540
        // TODO - Bib verification for those poor saps w/o pcntl
541
      }
541
      }
542
      $offset = $offset + $limit;
542
      $offset = $offset + $limit;
543
      parent::putlog("Collecting current data keys starting at $offset");
543
      parent::putlog("Collecting current data keys starting at $offset");
544
      $db = MDB2::connect($this->dsn);
544
      $db = MDB2::connect($this->dsn);
545
      $sql = "SELECT bnum, bib_lastupdate FROM locum_facet_heap ORDER BY bnum LIMIT $limit OFFSET $offset";
545
      $sql = "SELECT bnum, bib_lastupdate FROM locum_bib_items WHERE active = '1' ORDER BY bnum LIMIT $limit OFFSET $offset";
546
      $init_result = $db->query($sql);
546
      $init_result = $db->query($sql);
547
      $init_bib_arr = $init_result->fetchAll(MDB2_FETCHMODE_ASSOC);
547
      $init_bib_arr = $init_result->fetchAll(MDB2_FETCHMODE_ASSOC);
548
    }
548
    }
549
  }
549
  }
550
 
550