IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 10, 2010, 3:51:39 PM (16 years ago)
Author:
bills
Message:

added tasks to run magictool -reverttree and -revertnode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/magic.pro

    r25419 r26856  
    1414$magicToTree_DB = 0
    1515$magicToProcess_DB = 0
     16$magicRevertTree_DB = 0
     17$magicRevertNode_DB = 0
    1618
    1719### Check status of tasks
     
    2830
    2931### Turn tasks on
     32macro magic.revert.on
     33  task magic.revert.node
     34    active true
     35  end
     36  task magic.revert.tree
     37    active true
     38  end
     39end
     40
    3041macro magic.on
    3142  task magic.tree.load
     
    4051  task magic.process.run
    4152    active true
     53  end
     54  magic.revert.on
     55end
     56
     57macro magic.revert.off
     58  task magic.revert.node
     59    active false
     60  end
     61  task magic.revert.tree
     62    active false
    4263  end
    4364end
     
    5778    active false
    5879  end
     80  magic.revert.off
    5981end
    6082
     
    328350  end
    329351end
     352
     353task magic.revert.node
     354  host         local
     355
     356  periods      -poll 5.0
     357  periods      -exec 60.0
     358  periods      -timeout 120.0
     359  npending     1
     360
     361  stdout NULL
     362  stderr $LOGSUBDIR/revertnode.log
     363
     364  task.exec
     365    if ($LABEL:n == 0) break
     366    $run = magictool -revertnode
     367    if ($DB:n == 0)
     368      option DEFAULT
     369    else
     370      # save the DB name for the exit tasks
     371      option $DB:$magicRevertNode_DB
     372      $run = $run -dbname $DB:$magicRevertNode_DB
     373      $magicRevertNode_DB ++
     374      if ($magicRevertNode_DB >= $DB:n) set magicRevertNode_DB = 0
     375    end
     376    add_poll_labels run
     377    command $run
     378  end
     379
     380  # success
     381  task.exit    0
     382  end
     383
     384  # locked list
     385  task.exit    default
     386    showcommand failure
     387  end
     388
     389  task.exit    crash
     390    showcommand crash
     391  end
     392
     393  # operation times out?
     394  task.exit    timeout
     395    showcommand timeout
     396  end
     397end
     398task magic.revert.tree
     399  host         local
     400
     401  periods      -poll 5.0
     402  periods      -exec 60.0
     403  periods      -timeout 120.0
     404  npending     1
     405
     406  stdout NULL
     407  stderr $LOGSUBDIR/reverttree.log
     408
     409  task.exec
     410    if ($LABEL:n == 0) break
     411    $run = magictool -reverttree
     412    if ($DB:n == 0)
     413      option DEFAULT
     414    else
     415      # save the DB name for the exit tasks
     416      option $DB:$magicRevertTree_DB
     417      $run = $run -dbname $DB:$magicRevertTree_DB
     418      $magicRevertTree_DB ++
     419      if ($magicRevertTree_DB >= $DB:n) set magicRevertTree_DB = 0
     420    end
     421    add_poll_labels run
     422    command $run
     423  end
     424
     425  # success
     426  task.exit    0
     427  end
     428
     429  # locked list
     430  task.exit    default
     431    showcommand failure
     432  end
     433
     434  task.exit    crash
     435    showcommand crash
     436  end
     437
     438  # operation times out?
     439  task.exit    timeout
     440    showcommand timeout
     441  end
     442end
Note: See TracChangeset for help on using the changeset viewer.