View | Details | Raw Unified | Return to bug 9252
Collapse All | Expand All

(-)a/misc/migration_tools/rebuild_zebra.pl (-6 / +5 lines)
Lines 232-246 sub index_records { Link Here
232
        mkdir "$directory" unless (-d $directory);
232
        mkdir "$directory" unless (-d $directory);
233
        mkdir "$directory/$record_type" unless (-d "$directory/$record_type");
233
        mkdir "$directory/$record_type" unless (-d "$directory/$record_type");
234
        if ($process_zebraqueue) {
234
        if ($process_zebraqueue) {
235
            my $entries = select_zebraqueue_records($record_type, 'deleted');
235
            my $entries = select_zebraqueue_records($record_type, 'updated');
236
            mkdir "$directory/del_$record_type" unless (-d "$directory/del_$record_type");
237
            $records_deleted = generate_deleted_marc_records($record_type, $entries, "$directory/del_$record_type", $as_xml);
238
            mark_zebraqueue_batch_done($entries);
239
            $entries = select_zebraqueue_records($record_type, 'updated');
240
            mkdir "$directory/upd_$record_type" unless (-d "$directory/upd_$record_type");
236
            mkdir "$directory/upd_$record_type" unless (-d "$directory/upd_$record_type");
241
            $num_records_exported = export_marc_records_from_list($record_type,
237
            $num_records_exported = export_marc_records_from_list($record_type,
242
                                                                  $entries, "$directory/upd_$record_type", $as_xml, $noxml, $records_deleted);
238
                                                                  $entries, "$directory/upd_$record_type", $as_xml, $noxml, $records_deleted);
243
            mark_zebraqueue_batch_done($entries);
239
            mark_zebraqueue_batch_done($entries);
240
            $entries = select_zebraqueue_records($record_type, 'deleted');
241
            mkdir "$directory/del_$record_type" unless (-d "$directory/del_$record_type");
242
            $records_deleted = generate_deleted_marc_records($record_type, $entries, "$directory/del_$record_type", $as_xml);
243
            mark_zebraqueue_batch_done($entries);
244
        } else {
244
        } else {
245
            my $sth = select_all_records($record_type);
245
            my $sth = select_all_records($record_type);
246
            $num_records_exported = export_marc_records_from_sth($record_type, $sth, "$directory/$record_type", $as_xml, $noxml, $nosanitize);
246
            $num_records_exported = export_marc_records_from_sth($record_type, $sth, "$directory/$record_type", $as_xml, $noxml, $nosanitize);
247
- 

Return to bug 9252