From bc447b5b0eb9d7c6fc7f70e2dfd4c5f2a11c2569 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 10 Jan 2013 13:29:03 +0100 Subject: [PATCH] neustart bug von taskserver gefixt --- SL/Controller/CsvImport.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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; -- 2.20.1