From bdf52a118c83754979d7de2476f98908b25bf317 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Tue, 11 Mar 2008 18:26:01 +0000 Subject: [PATCH] working multitasking git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9691 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 9019a1e5f..e18545c31 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -953,15 +953,15 @@ sub next_task { StdoutEvent => "task_result", StderrEvent => "task_debug", CloseEvent => "task_done", - ); + ); $heap->{task}->{ $task->ID } = $task; } } sub handle_task_result { - my ($kernel, $heap, $client_answer, $heap_id) = @_[KERNEL, HEAP, ARG0, ARG1]; - daemon_log(Dumper($heap_id),1); + my ($kernel, $heap, $result) = @_[KERNEL, HEAP, ARG0]; + my $client_answer = $result->{'answer'}; if( $client_answer =~ s/session_id=(\d+)$// ) { my $session_id = $1; if( defined $session_id ) { @@ -1164,8 +1164,19 @@ sub process_task { } } - print $client_answer; - return; + my $filter = POE::Filter::Reference->new(); + my %result = ( + status => "seems ok to me", + answer => $client_answer, + ); + + my $output = $filter->put( [ \%result ] ); + print @$output; + + +# print STDERR $client_answer."\n"; +# print $client_answer; +# return; } -- 2.30.2