Ignore:
Timestamp:
02/04/10 13:58:41 (13 years ago)
Author:
ramonb
Message:
  • PHP4 fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.3/web/addons/job_monarch/libtoga.php

    r650 r652  
    3434                $this->restvars         = array();
    3535
    36                 $this->clustername      = $httpvars["c"] ? $httpvars["c"] : $getvars["c"];
    37                 $this->metricname       = $httpvars["m"] ? $httpvars["m"] : $getvars["m"];
     36                $this->clustername      = isset( $httpvars["c"] ) ? $httpvars["c"] : $getvars["c"];
     37                $this->metricname       = isset( $httpvars["m"] ) ? $httpvars["m"] : $getvars["m"];
    3838
    3939                if( count( $httpvars ) > 0 )
     
    8484
    8585$CLUSTER_CONFS  = array();
     86
     87ini_set("memory_limit","1024000000");
     88set_time_limit(0);
    8689
    8790// Monarch's conf
     
    475478        function getData()
    476479        {
    477                 $errstr;
    478                 $errno = 0;
    479                 $timeout = 3;
     480                $errstr         = '';
     481                $errno          = 0;
     482                $timeout        = 3;
    480483
    481484                $fp = fsockopen( $this->ip, $this->port, $errno, $errstr, $timeout );
     
    679682                $nodes = $this->nodes;
    680683
    681                 if ( $attrs['TN'] )
    682                 {
    683                         // Ignore dead metrics. Detect and mask failures.
    684                         if ( $attrs['TN'] > $attrs['TMAX'] * 4 )
    685                         {
    686                                 return;
     684                if( isset( $attrs['TN'] ) )
     685                {
     686                        if ( $attrs['TN'] )
     687                        {
     688                                // Ignore dead metrics. Detect and mask failures.
     689                                if ( $attrs['TN'] > $attrs['TMAX'] * 4 )
     690                                {
     691                                        return;
     692                                }
    687693                        }
    688694                }
Note: See TracChangeset for help on using the changeset viewer.