diff --git a/eprints1.pl b/eprints1.pl index 3bb413fc39fa28d192e592e6fde0f0625ba20d54..70d3705df8611ce8f99fb319c7721b6e2f389292 100755 --- a/eprints1.pl +++ b/eprints1.pl @@ -164,7 +164,6 @@ my @ot2ut_synced_columns= qw( eprint_id eprint_status lastmod context ts_upload my $ot2ut_eprint_status= 'archive'; my $silent_upload_success= 0; my $do_upload= 0; -my $no_doi= 0; my $ignore_errors= 0; if ($0 eq './ot2ut.pl') { $op_mode= 'ot2ut'; $do_upload= 1; $MAX_SYNC= 1; } @@ -227,8 +226,7 @@ while (defined ($arg= shift (@ARGV))) elsif ($opt eq 'reset') { $op_mode= $opt; } elsif ($opt eq 'force') { $force= defined($val) ? $val : 1; } elsif ($opt eq 'upload') { $do_upload= defined($val) ? $val : 1; } - elsif ($opt eq 'buffer') { $ot2ut_eprint_status= 'buffer'; $no_doi= 1; } - elsif ($opt eq 'no-doi') { $no_doi= defined($val) ? $val : 1; } + elsif ($opt eq 'buffer') { $ot2ut_eprint_status= 'buffer'; } elsif ($opt eq 'ignore-errors') { $ignore_errors= defined($val) ? $val : 1; } elsif ($opt eq 'oma' || $opt eq 'PAF') { $op_mode= 'oma'; $do_upload= 1; } else { usage("unknown option $arg"); } @@ -2485,8 +2483,8 @@ sub oma my $eprint_status= $row->{eprint_status}; if ($eprint_status eq 'buffer') - { $ot2ut_eprint_status= 'buffer'; $no_doi= 1; $ignore_errors= 1; } - else { $ot2ut_eprint_status= 'archive'; $no_doi= 0; $ignore_errors= 0; } + { $ot2ut_eprint_status= 'buffer'; $ignore_errors= 1; } + else { $ot2ut_eprint_status= 'archive'; $ignore_errors= 0; } $col_req->update({ _id => $row->{_id}}, { '$set' => { status => 'in_progress' }}); @@ -2586,14 +2584,11 @@ sub ot2ut if ($ot2ut_eprint_status eq 'archive') { - my @fetch_pars; - push (@fetch_pars, { doi => 1 }) unless ($no_doi); - print __LINE__, " no_doi=[$no_doi] fetch_pars: ", Dumper(\@fetch_pars); sleep(3); - $res1= $epr->fetch_data('archive', @fetch_pars); + $res1= $epr->fetch_data('archive'); } elsif ($ot2ut_eprint_status eq 'buffer') { - $res1= $epr->fetch_data('buffer'); # these do not have DOIs + $res1= $epr->fetch_data('buffer'); } if (defined ($res1)) @@ -2611,7 +2606,7 @@ sub ot2ut my $cnt_synced= 0; my $cnt_errors= 0; my $cnt_eprint_ids= @eprint_ids; - print __LINE__, " ot2ut: ot2ut_eprint_status=$ot2ut_eprint_status no_doi=$no_doi cnt_eprint_ids=$cnt_eprint_ids MAX_SYNC=$MAX_SYNC\n"; + print __LINE__, " ot2ut: ot2ut_eprint_status=$ot2ut_eprint_status cnt_eprint_ids=$cnt_eprint_ids MAX_SYNC=$MAX_SYNC\n"; sleep(3); foreach my $eprint_id (@eprint_ids) { @@ -2881,8 +2876,7 @@ sub generate_utheses_metadata push (@errors, { error => 'no_file' }); } - my ($doi, $eprint_status)= map { $row->{$_} } qw(doi eprint_status); - push (@errors, { error => 'no_doi', note => 'for now...' }) unless (defined($doi) || $no_doi); + my ($eprint_status)= map { $row->{$_} } qw(eprint_status); my $utheses_json_path= 'othes/utheses_json/' . $eprintid . '.json'; my $utheses_upload_result_json_path= 'othes/utheses_json/' . $eprintid . '_upload_result.json';