Changeset 10 for trunk/gridctl.php


Ignore:
Timestamp:
Jun 4, 2015, 9:48:05 PM (10 years ago)
Author:
gegorbet
Message:

fixes to allow simultaneous production/development jobs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gridctl.php

    r6 r10  
    11<?php
    2 
    3 $us3bin = exec( "ls -d ~us3/bin" );
    4 include_once "$us3bin/listen-config.php";
    5 include "$us3bin/cleanup_aira.php";
    6 include "$us3bin/cleanup_gfac.php";
    72
    83// Global variables
     
    7469   {
    7570      $status_in  = $status;
    76 //write_log( "$loghdr status_in=$status_in" );
    7771      $status     = aira_status( $gfacID, $status_in );
    7872if($status != $status_in )
     
    155149      case "FINISHED":
    156150      case "DONE":
    157          if ( is_aira_job( $gfacID ) )
    158          {
    159             complete();
    160          }
     151//         if ( is_aira_job( $gfacID ) )
     152//         {
     153//            complete();
     154//         }
    161155      case "PROCESSING":
    162156      default:
     
    437431   global $us3_db;
    438432   global $loghdr;
     433   global $class_dir;
    439434
    440435   // Double check that the gfacID exists
     
    460455   if ( $requestID == 0 ) return;
    461456
    462    if ( preg_match( "/US3-AIRA/i", $gfacID ) )
    463    {
     457   if ( preg_match( "/US3-A/i", $gfacID ) )
     458   {
     459      $me_devel  = preg_match( "/class_devel/", $class_dir );
     460      $job_devel = preg_match( "/US3-ADEV/i", $gfacID );
     461      if ( ( !$me_devel  &&  !$job_devel )  ||
     462           (  $me_devel  &&   $job_devel ) )
     463      {  // If job from appropriate Airavata server, process it
    464464//write_log( "$loghdr CALLING aira_cleanup()" );
    465       aira_cleanup( $us3_db, $requestID, $gLink );
     465         aira_cleanup( $us3_db, $requestID, $gLink );
     466      }
    466467//write_log( "$loghdr RTN FR aira_cleanup()" );
    467468   }
     
    625626   global $cluster;
    626627
    627    if ( preg_match( "/US3-AIRA/i", $gfacID )  &&
     628   if ( preg_match( "/US3-A/i", $gfacID )  &&
    628629        ! preg_match( "/juropa/i", $cluster ) )
    629630   {
     
    997998   global $self;
    998999   global $loghdr;
     1000   global $class_dir;
    9991001//echo "a_st: st_in$status_in : $gfacID\n";
    10001002   //$status_gw = standard_status( $status_in );
     
    10021004//echo "a_st:  st_db=$status_gw\n";
    10031005   $status    = $status_gw;
    1004 
    1005    if ( preg_match( "/US3-AIRA/i", $gfacID ) )
    1006    {
     1006   $me_devel  = preg_match( "/class_devel/", $class_dir );
     1007   $job_devel = preg_match( "/US3-ADEV/i", $gfacID );
     1008   $devmatch  = ( ( !$me_devel  &&  !$job_devel )  ||
     1009                  (  $me_devel  &&   $job_devel ) );
     1010
     1011//write_log( "$loghdr  gfacID=$gfacID  devmatch=$devmatch" );
     1012//write_log( "$loghdr   me_d=$me_devel  jo_d=$job_devel  cd=$class_dir" );
     1013   if ( preg_match( "/US3-A/i", $gfacID )  &&  $devmatch )
     1014   {  // Airavata job and development/production type is right
    10071015      $status_ex = getExperimentStatus( $gfacID );
     1016//write_log( "$loghdr status_ex $status_ex" );
    10081017
    10091018      if ( $status_ex == 'COMPLETED' )
     
    10471056      }
    10481057
    1049 write_log( "$loghdr status/_in/_gw/_ex=$status/$status_in/$status_gw/$status_ex" );
     1058//write_log( "$loghdr status/_in/_gw/_ex=$status/$status_in/$status_gw/$status_ex" );
     1059//write_log( "  me_d=$me_devel jo_d=$job_devel dm=$devmatch cd=$class_dir" );
    10501060      if ( $status != $status_gw )
    10511061      {
Note: See TracChangeset for help on using the changeset viewer.