IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25465 for trunk/ippTasks


Ignore:
Timestamp:
Sep 21, 2009, 2:49:37 PM (17 years ago)
Author:
bills
Message:

Detect the completion and state updates of a magicDSRun in a new advance task.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/destreak.pro

    r25463 r25465  
    1313### indexes into Database lists
    1414$magicToDS_DB = 0
     15$magicDSAdvance_DB = 0
    1516$magicDSToRevert_DB = 0
    1617$magicDSCompletedRevert_DB = 0
    … …  
    4142### Turn tasks on
    4243macro destreak.on
     44    # destreak and revert should not run at the same time
     45    destreak.revert.off
     46
    4347    task destreak.load
    4448        active true
    … …  
    4751        active true
    4852    end
     53    task destreak.advance
     54        active true
     55    end
    4956end
    5057
    5158macro destreak.revert.on
     59    # destreak and revert should not run at the same time
     60    destreak.off
     61
    5262    task destreak.revert.load
    5363        active true
    … …  
    6777    end
    6878    task destreak.run
     79        active false
     80    end
     81    task destreak.advance
    6982        active false
    7083    end
    … …  
    100113  npending     1
    101114
    102   stdout NULL
    103   stderr $LOGDIR/magic.destreak.log
     115#  stdout NULL
     116#  stderr $LOGSUBDIR/destreak.load.log
    104117
    105118  task.exec
    … …  
    233246end
    234247
     248task           destreak.advance
     249    # task to finish processing for magicDSRuns
     250  host         local
     251
     252  periods      -poll $LOADPOLL
     253  #periods      -exec $LOADEXEC
     254  periods      -exec 30
     255  periods      -timeout 20
     256  npending     1
     257
     258#  stdout NULL
     259#  stderr $LOGSUBDIR/destreak.advance.log
     260
     261  task.exec
     262    $run = magicdstool -advancerun
     263    if ($DB:n != 0)
     264
     265      $run = $run -dbname $DB:$magicDSAdvance_DB
     266
     267      $magicDSAdvance_DB ++
     268      if ($magicDSAdvance_DB >= $DB:n) set magicDSAdvance_DB = 0
     269    end
     270    add_poll_args run
     271    add_poll_labels run
     272    command $run
     273  end
     274
     275  # success
     276  task.exit    0
     277  end
     278
     279  # locked list
     280  task.exit    default
     281    showcommand failure
     282  end
     283
     284  task.exit    crash
     285    showcommand crash
     286  end
     287
     288  # operation times out?
     289  task.exit    timeout
     290    showcommand timeout
     291  end
     292end
     293
    235294task           destreak.revert.load
    236295  host         local
    … …  
    386445
    387446  stdout NULL
    388   stderr $LOGSUBDIR/destreak.completed.revert
     447  stderr $LOGSUBDIR/destreak.completed.revert.log
    389448
    390449  task.exec
    … …  
    398457      $run = $run -dbname $DB:$magicDSCompletedRevert_DB
    399458
     459      $magicDSCompletedRevert_DB ++
    400460      if ($magicDSCompletedRevert_DB >= $DB:n) set magicDSCompletedRevert_DB = 0
    401461    end
Note: See TracChangeset for help on using the changeset viewer.