IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19285


Ignore:
Timestamp:
Aug 29, 2008, 10:55:06 AM (18 years ago)
Author:
bills
Message:

Added a task to run pztool -clearcommonfaults periodically.
Set exec time to 30 minutes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/summit.copy.pro

    r18904 r19285  
    4747    active true
    4848  end
     49  task pztool.clearfault
     50      active true
     51  end
    4952end
    5053
     
    6770  task summit_copy
    6871    active false
     72  end
     73  task pztool.clearfault
     74      active false
    6975  end
    7076end
     
    7480$pztoolPendingExp_DB = 0
    7581$pztoolPendingImfile_DB = 0
     82$pztoolClearFault_DB = 0
    7683
    7784# build a book of datastores to poll for data
     
    433440    end
    434441end
     442
     443task pztool.clearfault
     444    host         local
     445
     446    # -exec is set much longer the first time this task runs
     447    periods      -exec       7 
     448    periods      -poll       1
     449    periods      -timeout   30
     450    npending     1
     451
     452    task.exec
     453      if ($DB:n == 0)
     454        command pztool -clearcommonfaults
     455      else
     456        command pztool -clearcommonfaults -dbname $DB:$pztoolClearFault_DB
     457
     458        $pztoolClearFault_DB ++
     459        if ($pztoolClearFault_DB >= $DB:n) set pztoolClearFault_DB = 0
     460      end
     461      periods -exec 1800
     462    end
     463
     464    # success
     465    task.exit 0
     466    end
     467
     468    task.exit default
     469        showcommand failure
     470    end
     471    task.exit timeout
     472        showcommand timeout
     473    end
     474end
Note: See TracChangeset for help on using the changeset viewer.