X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FBackgroundJob%2FCsvImport.pm;h=18cf7cf0d375f0fc09b81be124cef239dc788d17;hb=1264cff68a2e27855c34fc2e00e1f6724ab004f4;hp=0300179640f4750c0fc31935f610240d7bfc72e0;hpb=b2321d6af4052de92acf0e3e1e81e29380a4d0f8;p=kivitendo-erp.git diff --git a/SL/BackgroundJob/CsvImport.pm b/SL/BackgroundJob/CsvImport.pm index 030017964..18cf7cf0d 100644 --- a/SL/BackgroundJob/CsvImport.pm +++ b/SL/BackgroundJob/CsvImport.pm @@ -51,8 +51,6 @@ sub run { $self->{db_obj} = shift; $self->do_import; - - $self->cleanup; } sub do_import { @@ -76,7 +74,7 @@ sub do_import { plan => { 'parsing csv' => 1, 'building data' => 2, - ( 'saving data' => 3, )x!!$test, + ( 'saving data' => 3, )x!$test, 'building report' => ($test ? 3 : 4), }, num_phases => ($test ? 3 : 4), @@ -84,12 +82,11 @@ sub do_import { $c->add_progress_tracker($self); - $c->test_and_import(test => 1, session_id => $job->data_as_hash->{session_id}); + $c->test_and_import(test => $test, session_id => $job->data_as_hash->{session_id}); if ($c->errors) { $job->set_data( errors => $c->errors, - progress => -1, )->save; } else { @@ -111,10 +108,6 @@ sub track_progress { $self->{db_obj}->save; } -sub cleanup { - -} - 1; __END__