Changeset 652 for branches/0.3/web/addons/job_monarch/libtoga.php
- Timestamp:
- 02/04/10 13:58:41 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.3/web/addons/job_monarch/libtoga.php
r650 r652 34 34 $this->restvars = array(); 35 35 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"]; 38 38 39 39 if( count( $httpvars ) > 0 ) … … 84 84 85 85 $CLUSTER_CONFS = array(); 86 87 ini_set("memory_limit","1024000000"); 88 set_time_limit(0); 86 89 87 90 // Monarch's conf … … 475 478 function getData() 476 479 { 477 $errstr ;478 $errno 479 $timeout 480 $errstr = ''; 481 $errno = 0; 482 $timeout = 3; 480 483 481 484 $fp = fsockopen( $this->ip, $this->port, $errno, $errstr, $timeout ); … … 679 682 $nodes = $this->nodes; 680 683 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 } 687 693 } 688 694 }
Note: See TracChangeset
for help on using the changeset viewer.