IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26045


Ignore:
Timestamp:
Nov 5, 2009, 11:14:59 AM (17 years ago)
Author:
bills
Message:

suport 'exposure' as component

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/dist.pro

    r26015 r26045  
    7878        break
    7979    end
    80     local host component default template varname length start count component_id
     80    local host component default template varname length start count component_id random_number
    8181    $component = $1
    8282    $template = $2
     
    9292        break
    9393    end
    94     # take last two letters of component id
    95     # treat it as an integer and use modulous of length of distribution hosts
    96     # to compute a host
    97     strlen $component length
    98     $start = $length - 2
    99     substr $component $start 2 index
    100     $component_id = $index % $count
     94    if ("$component" != "exposure")
     95        # take last two letters of component id
     96        # treat it as an integer and use modulous of length of distribution hosts
     97        # to compute a host
     98        strlen $component length
     99        $start = $length - 2
     100        substr $component $start 2 index
     101        $component_id = $index % $count
     102    else
     103        # randomly chose one of the hosts
     104        $random_number = int(100 * rnd(0)) % $count
     105        sprintf component_id "%d" $random_number
     106    end
    101107
    102108    book getword ipphosts distribution $component_id -var host
Note: See TracChangeset for help on using the changeset viewer.