Lines 72-78
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
72 |
); |
72 |
); |
73 |
|
73 |
|
74 |
$template->param( |
74 |
$template->param( |
75 |
SCRIPT_NAME => $ENV{'SCRIPT_NAME'}, |
75 |
SCRIPT_NAME => '/cgi-bin/koha/tools/stage-marc-import.pl', |
76 |
uploadmarc => $fileID, |
76 |
uploadmarc => $fileID, |
77 |
record_type => $record_type, |
77 |
record_type => $record_type, |
78 |
); |
78 |
); |
Lines 101-107
if ($completedJobID) {
Link Here
|
101 |
my $job_size = () = $marcrecord =~ /\035/g; |
101 |
my $job_size = () = $marcrecord =~ /\035/g; |
102 |
# if we're matching, job size is doubled |
102 |
# if we're matching, job size is doubled |
103 |
$job_size *= 2 if ($matcher_id ne ""); |
103 |
$job_size *= 2 if ($matcher_id ne ""); |
104 |
$job = C4::BackgroundJob->new($sessionID, $filename, $ENV{'SCRIPT_NAME'}, $job_size); |
104 |
$job = C4::BackgroundJob->new($sessionID, $filename, '/cgi-bin/koha/tools/stage-marc-import.pl', $job_size); |
105 |
my $jobID = $job->id(); |
105 |
my $jobID = $job->id(); |
106 |
|
106 |
|
107 |
# fork off |
107 |
# fork off |
Lines 120-126
if ($completedJobID) {
Link Here
|
120 |
# close STDERR; # there is no good reason to close STDERR |
120 |
# close STDERR; # there is no good reason to close STDERR |
121 |
} else { |
121 |
} else { |
122 |
# fork failed, so exit immediately |
122 |
# fork failed, so exit immediately |
123 |
warn "fork failed while attempting to run $ENV{'SCRIPT_NAME'} as a background job: $!"; |
123 |
warn "fork failed while attempting to run tools/stage-marc-import.pl as a background job: $!"; |
124 |
exit 0; |
124 |
exit 0; |
125 |
} |
125 |
} |
126 |
|
126 |
|
127 |
- |
|
|