IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25423 for trunk/ippTasks


Ignore:
Timestamp:
Sep 16, 2009, 5:05:19 PM (17 years ago)
Author:
bills
Message:

added new magicDSRun.states goto_restored and goto_censored
The 'revert' process handles processing these transitions
the end result is either 'restored' or 'cesored'
Removed torestoreMode which wasn't implemented yet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/destreak.pro

    r25419 r25423  
    1111book init magicDSToRevert
    1212
    13 ### Database lists
     13### indexes into Database lists
    1414$magicToDS_DB = 0
    1515$magicDSToRevert_DB = 0
     16$magicDSCompletedRevert_DB = 0
    1617
    1718#list of stages
     
    2829### Check status of tasks
    2930macro magic.status
    30   book listbook magicToDS
    31   book listbook magicDSToRevert
     31    book listbook magicToDS
     32    book listbook magicDSToRevert
    3233end
    3334
    3435### Reset tasks
    3536macro magic.reset
    36   book init magicToDS
    37   book init magicDSToRevert
     37    book init magicToDS
     38    book init magicDSToRevert
    3839end
    3940
    4041### Turn tasks on
    4142macro destreak.on
    42   task destreak.load
    43     active true
    44   end
    45   task destreak.run
    46     active true
    47   end
     43    task destreak.load
     44        active true
     45    end
     46    task destreak.run
     47        active true
     48    end
    4849end
    4950
     
    5556        active true
    5657    end
    57 end
     58    task destreak.completed.revert
     59        active true
     60    end
     61end
     62
    5863### Turn tasks off
    5964macro destreak.off
    60   task destreak.load
    61     active false
    62   end
    63   task destreak.run
    64     active false
    65   end
     65    task destreak.load
     66        active false
     67    end
     68    task destreak.run
     69        active false
     70    end
    6671end
    6772
     
    7176    end
    7277    task destreak.revert.run
     78        active false
     79    end
     80    task destreak.completed.revert
    7381        active false
    7482    end
     
    363371
    364372task           destreak.completed.revert
     373    # task to finish processing for magicDSRuns being reverted or restored
    365374  host         local
    366375
    367376  periods      -poll $LOADPOLL
    368   periods      -exec $LOADEXEC
     377  #periods      -exec $LOADEXEC
     378  periods      -exec 30
    369379  periods      -timeout 20
    370380  npending     1
     
    380390    else
    381391      # save the DB name for the exit tasks
    382       option $DB:$magicDSToRevert_DB
    383       $run = $run -dbname $DB:$magicDSToRevert_DB
     392      option $DB:$magicDSCompletedRevert_DB
     393
     394      $run = $run -dbname $DB:$magicDSCompletedRevert_DB
     395
     396      if ($magicDSCompletedRevert_DB >= $DB:n) set magicDSCompletedRevert_DB = 0
    384397    end
    385398    add_poll_args run
     
    390403  # success
    391404  task.exit    0
    392     # convert 'stdout' to book format
    393     ipptool2book stdout magicDSToRevert -key magic_ds_id:component -uniq -setword dbname $options:0 -setword pantaskState INIT
    394     if ($VERBOSE > 2)
    395       book listbook magicDSToRevert
    396     end
    397 
    398     # delete existing entries in the appropriate pantaskStates
    399     process_cleanup magicDSToRevert
    400405  end
    401406
Note: See TracChangeset for help on using the changeset viewer.