Ignore:
Timestamp:
Feb 15, 2010 8:51:46 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
6a8a9ec
Parents:
3132419
Message:

Coordinate parallel starts: wait for remote nodes to configure ssh for access

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedkit/gateway_lib.pm

    r3132419 rc3a3fe3  
    339339}
    340340
     341sub testcmd_repeat {
     342    my($cmd, $timeout, $sleep) = @_;
     343    my $start = time();
     344    $sleep = 5 unless $sleep;
     345
     346    while (1) {
     347        system("$cmd");
     348        if ($?) {
     349            if ($timeout and time() - $start > $timeout) {
     350                return undef;
     351            }
     352            else { sleep($sleep); }
     353        }
     354        else { return 1; }
     355    }
     356}
    341357
    3423581;
Note: See TracChangeset for help on using the changeset viewer.