From: Sven Schöling Date: Thu, 10 Jan 2013 12:29:03 +0000 (+0100) Subject: neustart bug von taskserver gefixt X-Git-Tag: release-3.1.0beta1~711 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=bc447b5b0eb9d7c6fc7f70e2dfd4c5f2a11c2569;p=kivitendo-erp.git neustart bug von taskserver gefixt --- diff --git a/SL/Controller/CsvImport.pm b/SL/Controller/CsvImport.pm index fd74fad91..0736d917b 100644 --- a/SL/Controller/CsvImport.pm +++ b/SL/Controller/CsvImport.pm @@ -26,7 +26,7 @@ use Rose::Object::MakeMethods::Generic ( scalar => [ qw(type profile file all_profiles all_charsets sep_char all_sep_chars quote_char all_quote_chars escape_char all_escape_chars all_buchungsgruppen all_units import_status errors headers raw_data_headers info_headers data num_imported num_importable displayable_columns file) ], - 'scalar --get_set_init' => [ qw(worker) ], + 'scalar --get_set_init' => [ qw(worker task_server) ], 'array' => [ progress_tracker => { }, add_progress_tracker => { interface => 'add', hash_key => 'progress_tracker' }, @@ -263,8 +263,11 @@ sub test_and_import_deferred { test => $params{test}, )->save; - SL::System::TaskServer->start_if_not_running; - SL::System::TaskServer->wake_up; + if ($self->task_server->is_running) { + $self->task_server->wake_up; + } else { + $self->task_server->start; + } flash('info', $::locale->text('Your import is beig processed.')); @@ -470,6 +473,9 @@ sub track_progress { } } +sub init_task_server { + SL::System::TaskServer->new; +} sub cleanup_reports { SL::DB::Manager::CsvImportReport->cleanup;