IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11008


Ignore:
Timestamp:
Jan 10, 2007, 7:45:07 AM (19 years ago)
Author:
eugene
Message:

added restricted search for book

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_00/ippTasks/phase2.pro

    r11001 r11008  
    3030
    3131macro phase2.status
    32   queueprint Phase2Imfiles
     32  book listbook p2pending
    3333  echo "Phase2ImfileFail: $Phase2ImfileFail"
    3434end
     
    4949  task.exec
    5050    # command p2tool -pendingimfile -simple -limit {$Phase2ImfileFail + 20}
    51     command p2tool -pendingimfile
     51    # XXX make sure we remove FAIL and TIMEOUT entries
     52    command p2tool -pendingimfile -limit 20
    5253  end
    5354
    5455  # success
    5556  task.exit    0
    56     # convert output to book format
     57    # stdout from the task is stored on queue 'stdout'
     58    # convert 'stdout' to book format
    5759    # only add entries which don't exist in the book
     60    # 'state' has value of NULL
    5861    ipptool2book stdout p2pending -key exp_tag:class_id -uniq
    5962    if ($VERBOSE > 2)
     
    8386
    8487  task.exec
    85     # XXX make equiv book command:
    8688    book npages p2pending -var N
    8789    if ($N == 0) break
     
    9193    # caution with these 'if' statements: syntax errors
    9294    # will make the task fail without given a good status
    93     # XXX pop off the bottom or the top?
    94     book getpage p2pending 0 -var pageName
    95     book setword p2pending $pageName status RUN
     95    book getpage p2pending 0 -var pageName -key state NULL
     96    book setword p2pending $pageName state RUN
    9697
     98    book getword p2pending $pageName camera -var CAMERA
    9799    book getword p2pending $pageName exp_tag -var EXP_TAG
    98100    book getword p2pending $pageName class_id -var CLASS_ID
     
    121123    # create the command line
    122124    if ($VERBOSE > 1)
    123       echo command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI
     125      echo command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI --camera $CAMERA
    124126    end
    125     ## XXX this is annoying: phase2.pl now requires camera :: it should not need this, it has the file.
    126     command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI --camera CTIO_MOSAIC2
     127    command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI --camera $CAMERA
    127128  end
    128129
     
    130131  task.exit 0
    131132    # phase2imfile.pl updates DB tables, here we just update the queue
    132     book setword p2pending $options:0 status DONE
     133    book setword p2pending $options:0 state DONE
    133134    # queuepush Phase2Imfiles -replace -key 1:2 "DONE $options:0"
    134135  end
     
    137138  task.exit    default
    138139    showcommand failure
    139     book setword p2pending $options:0 status FAIL
     140    book setword p2pending $options:0 state FAIL
    140141    # queuepush Phase2Imfiles -replace -key 1:2 "FAIL $options:0"
     142    # drop failed entries from the book lists?
    141143    $Phase2ImfileFail ++
    142144  end
     
    145147  task.exit    timeout
    146148    showcommand timeout
    147     book setword p2pending $options:0 status TIMEOUT
     149    book setword p2pending $options:0 state TIMEOUT
    148150    # queuepush Phase2Imfiles -replace -key 1:2 "TIMEOUT $options:0"
    149151    $Phase2ImfileFail ++
Note: See TracChangeset for help on using the changeset viewer.