IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 2, 2006, 12:36:59 PM (20 years ago)
Author:
eugene
Message:

updates to match new refactoring of tables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/phase0.pro

    r9081 r9104  
    22## this file contains the tasks for running the phase 0 stage
    33
    4 ## these tasks use the queue Phase0PendingImfiles
    5 ## the Phase0PendingImfiles queue contains:
     4## these tasks use the queue Phase0Imfiles
     5## the Phase0Imfiles queue contains:
    66## STATE EXP_KEY CLASS CLASS_ID URI-FITS
    77## queue keys are counted from 0
    88
    9 queueinit Phase0PendingImfiles
    10 queueinit Phase0PendingExposures
     9queueinit Phase0Imfiles
     10queueinit Phase0Exposures
    1111if ($?network == 0)
    1212  $network = 1
     
    1717
    1818# select images ready for phase0 analysis
    19 # new entries are added to queue Phase0PendingImfiles
     19# new entries are added to queue Phase0Imfiles
    2020# compare the new list with the ones already selected
    2121task           phase0.imfile.load
     
    3636    # save stdout and stderr
    3737
    38     # compare output with Phase0PendingImfiles queue
     38    # compare output with Phase0Imfiles queue
    3939    # only add entries which don't exist in queue
    4040    queuesize stdout -var Nqueue
    4141    for i 0 $Nqueue
    4242      queuepop stdout -var line
    43       queuepush Phase0PendingImfiles -uniq -key 1 "NEW $line"
     43      queuepush Phase0Imfiles -uniq -key 1 "NEW $line"
    4444    end
    4545
    4646    # delete existing entries which are DONE
    47     queuedrop Phase0PendingImfiles -key 0 DONE
     47    queuedrop Phase0Imfiles -key 0 DONE
    4848  end
    4949
    5050  # locked list
    5151  task.exit    default
    52     echo "*** phase0 pending imfiles: failure"
    53   end
    54 
    55   # operation times out?
    56   task.exit    timeout
    57     echo "*** phase0 pending imfiles: timeout"
     52    echo "phase0 pending imfiles: failure"
     53  end
     54
     55  # operation times out?
     56  task.exit    timeout
     57    echo "phase0 pending imfiles: timeout"
    5858  end
    5959end
    6060
    6161# run the phase0imfile script on pending images
    62 task           phase0.imfile.process
     62task           phase0.imfile.run
    6363  periods      -poll 0.5
    6464  periods      -exec 1
     
    6666
    6767  task.exec
    68     queuesize Phase0PendingImfiles -var N
     68    queuesize Phase0Imfiles -var N
    6969    if ($N == 0) break
    7070    if ($network == 0) break
     
    7373    # caution with these 'if' statements: syntax errors
    7474    # will make the task fail without given a good status
    75     queuepop Phase0PendingImfiles -var line -key 0 NEW
     75    queuepop Phase0Imfiles -var line -key 0 NEW
    7676    if ("$line" == "NULL") break
    7777
    7878    strpop line state
    79     queuepush Phase0PendingImfiles -replace -key 1 "RUN $line"
    80 
    81     ## the Phase0PendingImfiles queue contains (line has popped STATE)
     79    queuepush Phase0Imfiles -replace -key 1 "RUN $line"
     80
     81    ## the Phase0Imfiles queue contains (line has popped STATE)
    8282    ## STATE EXP_KEY CLASS CLASS_ID URI-FITS
    8383    list word -split $line
     
    103103  task.exit 0
    104104    # phase0imfile.pl updates DB tables, here we just update the queue
    105     queuepush Phase0PendingImfiles -replace -key 1 "DONE $options:0"
     105    queuepush Phase0Imfiles -replace -key 1 "DONE $options:0"
    106106  end
    107107
     
    109109  task.exit    default
    110110    echo "failure for phase0imfile.pl: $options:0"
    111     queuepush Phase0PendingImfiles -replace -key 1 "FAIL $options:0"
     111    queuepush Phase0Imfiles -replace -key 1 "FAIL $options:0"
    112112  end
    113113
     
    115115  task.exit    timeout
    116116    echo "timeout for phase0imfile.pl: $options:0"
    117     queuepush Phase0PendingImfiles -replace -key 1 "TIMEOUT $options:0"
    118   end
    119 end
    120 
    121 ## these tasks use the queue Phase0PendingExposures
    122 ## the Phase0PendingExposures queue contains:
     117    queuepush Phase0Imfiles -replace -key 1 "TIMEOUT $options:0"
     118  end
     119end
     120
     121## these tasks use the queue Phase0Exposures
     122## the Phase0Exposures queue contains:
    123123## STATE EXP_KEY CAMERA TELESCOPE TYPE NCLASS
    124124
    125125# select images ready for phase0 analysis
    126 # new entries are added to queue Phase0PendingExposures
     126# new entries are added to queue Phase0Exposures
    127127# compare the new list with the ones already selected
    128128task           phase0.exp.load
     
    141141    local i Nqueue
    142142
    143     # compare output with Phase0PendingExposures queue
     143    # compare output with Phase0Exposures queue
    144144    # only add entries which don't exist in queue
    145145    queuesize stdout -var Nqueue
    146146    for i 0 $Nqueue
    147147      queuepop stdout -var line
    148       queuepush Phase0PendingExposures -uniq -key 1 "NEW $line"
     148      queuepush Phase0Exposures -uniq -key 1 "NEW $line"
    149149    end
    150150
    151151    # delete existing entries which are DONE
    152     queuedrop Phase0PendingExposures -key 0 DONE
     152    queuedrop Phase0Exposures -key 0 DONE
    153153  end
    154154
     
    165165
    166166# run the phase0imfile script on pending images
    167 task           phase0.exp.process
     167task           phase0.exp.run
    168168  periods      -poll 0.5
    169169  periods      -exec 1.0
     
    171171
    172172  task.exec
    173     queuesize Phase0PendingExposures -var N
     173    queuesize Phase0Exposures -var N
    174174    if ($N == 0) break
    175175    if ($network == 0) break
     
    178178    # caution with these 'if' statements: syntax errors
    179179    # will make the task fail without given a good status
    180     queuepop Phase0PendingExposures -var line -key 0 NEW
     180    queuepop Phase0Exposures -var line -key 0 NEW
    181181    if ("$line" == "NULL") break
    182182
    183183    strpop line state
    184     queuepush Phase0PendingExposures -replace -key 1 "RUN $line"
    185 
    186     ## the Phase0PendingExposures queue contains:
     184    queuepush Phase0Exposures -replace -key 1 "RUN $line"
     185
     186    ## the Phase0Exposures queue contains:
    187187    ## STATE EXP_KEY CAMERA TELESCOPE TYPE NCLASS
    188188    list word -split $line
     
    208208  task.exit 0
    209209    # phase0exp.pl updates DB tables, here we just update the queue
    210     queuepush Phase0PendingExposures -replace -key 1 "DONE $options:0"
     210    queuepush Phase0Exposures -replace -key 1 "DONE $options:0"
    211211  end
    212212
    213213  # default exit status
    214214  task.exit    default
    215     queuepush Phase0PendingExposures -replace -key 1 "FAIL $options:0"
    216   end
    217 
    218   # operation times out?
    219   task.exit    timeout
    220     queuepush Phase0PendingExposures -replace -key 1 "TIMEOUT $options:0"
     215    queuepush Phase0Exposures -replace -key 1 "FAIL $options:0"
     216  end
     217
     218  # operation times out?
     219  task.exit    timeout
     220    queuepush Phase0Exposures -replace -key 1 "TIMEOUT $options:0"
    221221  end
    222222end
Note: See TracChangeset for help on using the changeset viewer.