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

(-)a/misc/migration_tools/rebuild_zebra.pl (-6 / +5 lines)
Lines 216-230 sub index_records { Link Here
216
        mkdir "$directory" unless (-d $directory);
216
        mkdir "$directory" unless (-d $directory);
217
        mkdir "$directory/$record_type" unless (-d "$directory/$record_type");
217
        mkdir "$directory/$record_type" unless (-d "$directory/$record_type");
218
        if ($process_zebraqueue) {
218
        if ($process_zebraqueue) {
219
            my $entries = select_zebraqueue_records($record_type, 'deleted');
219
            my $entries = select_zebraqueue_records($record_type, 'updated');
220
            mkdir "$directory/del_$record_type" unless (-d "$directory/del_$record_type");
221
            $records_deleted = generate_deleted_marc_records($record_type, $entries, "$directory/del_$record_type", $as_xml);
222
            mark_zebraqueue_batch_done($entries);
223
            $entries = select_zebraqueue_records($record_type, 'updated');
224
            mkdir "$directory/upd_$record_type" unless (-d "$directory/upd_$record_type");
220
            mkdir "$directory/upd_$record_type" unless (-d "$directory/upd_$record_type");
225
            $num_records_exported = export_marc_records_from_list($record_type, 
221
            $num_records_exported = export_marc_records_from_list($record_type, 
226
                                                                  $entries, "$directory/upd_$record_type", $as_xml, $noxml, $records_deleted);
222
                                                                  $entries, "$directory/upd_$record_type", $as_xml, $noxml, $records_deleted);
227
            mark_zebraqueue_batch_done($entries);
223
            mark_zebraqueue_batch_done($entries);
224
            $entries = select_zebraqueue_records($record_type, 'deleted');
225
            mkdir "$directory/del_$record_type" unless (-d "$directory/del_$record_type");
226
            $records_deleted = generate_deleted_marc_records($record_type, $entries, "$directory/del_$record_type", $as_xml);
227
            mark_zebraqueue_batch_done($entries);
228
        } else {
228
        } else {
229
            my $sth = select_all_records($record_type);
229
            my $sth = select_all_records($record_type);
230
            $num_records_exported = export_marc_records_from_sth($record_type, $sth, "$directory/$record_type", $as_xml, $noxml, $nosanitize);
230
            $num_records_exported = export_marc_records_from_sth($record_type, $sth, "$directory/$record_type", $as_xml, $noxml, $nosanitize);
231
- 

Return to bug 9243