or ...
 
# fill in @machines
 
use strict;
use Data::Dumper;
use lib qw( ... ); # Path to PLSTAF
use PLSTAF;
my $name = "test";
&STAF::Register($name);
 
my $requests = 0;
foreach my $machine (@machines)
{
    if(STAF::Submit($machine, "PING", "PING", 2) == $STAF::kOk)
    {
        $requests++;
    }
}
 
if($requests) # I think this test may be redundent
{
    for(1 .. $requests)
    {
        STAF::Submit("local", "QUEUE", "GET wait 3");
        my $result = $STAF::Result;
        my $data;
        if(STAF::STAFIsMarshalledData($result))
        {
            my $mc = STAF::STAFUnmarshall($result);
            $data = $mc->getRootObject()->{message};
        }
        else
        {
            # take care of it
        }
        print Dumper($data);
        # parse it out further to do real work here
    }
}
 


________________________________

        From: Edmonds, Michael 
        Sent: Wednesday, October 15, 2008 6:08 PM
        To: 'Avijit Roy'; staf-users@lists.sourceforge.net
        Subject: RE: [staf-users] Is there any way to track submitted
request statuscompletion with basic STAF
        
        
        use submit2
(http://staf.sourceforge.net/current/STAFPerl.htm#Header_Submit2OO) with
STAF::STAFHandle::kReqQueue
        then send a Synchronous request to the QUEUE service for the
results of those requests.


________________________________

                From: Avijit Roy [mailto:[EMAIL PROTECTED] 
                Sent: Wednesday, October 15, 2008 5:08 PM
                To: staf-users@lists.sourceforge.net
                Subject: [staf-users] Is there any way to track
submitted request statuscompletion with basic STAF
                
                

                Hi,

                I am trying to execute some process on 3 different
machines from one of the driver machine. The main goal is after
completion the tasks on three different machines, I want to copy the
result file from those three machines into driver machine and compute
the result.

                I am using STAF and PERL to do the basic prototype.

                My question is after submitting the task using STAF, is
there any way to check that submitted tasks has completed or not?

                 

                Here are the following steps which I want to achieve: I
am stuck on Step 5 now.

                 

                Step 1 - Registering STAF  

                Step 2 - Submitting the request on Machine1

                Step 3 - Submitting the request on Machine2

                Step 4 - Submitting the request on Machine4  

                Step 5 - I want to check Step 3, 4 and 5 tasks has
completed or not   ----------------------------------->? How should I do
that?

                Step 6 - If completed all the tasks copy the result file
from machine 1, 2, 3 to driver machine

                 

                 

                Can anybody please suggest me how to work it out?

                 

                Thanks, Avi

                 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to