IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29329


Ignore:
Timestamp:
Oct 5, 2010, 3:34:47 PM (16 years ago)
Author:
bills
Message:

new task to stop jobs that repeatedly fault

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/pstamp.pro

    r29144 r29329  
    1616$pstampRevDep_DB = 0
    1717$pstampCleanup_DB = 0
     18$pstampStopFaulted_DB = 0
    1819
    1920# set PS_DBSERVER if postage stamp database host is not the same as the value for DBSERVER in site.config
     
    9091        active false
    9192    end
    92     task pstamp.job.revert
    93         active false
    94     end
    9593    task pstamp.dependent.load
    9694        active false
     
    108106        active true
    109107    end
     108    task pstamp.stopfaulted
     109        active true
     110    end
    110111end
    111112macro pstamp.revert.off
     
    114115    end
    115116    task pstamp.dependent.revert
     117        active false
     118    end
     119    task pstamp.stopfaulted
    116120        active false
    117121    end
     
    845849    end
    846850end
     851
     852task pstamp.stopfaulted
     853    host        local
     854
     855    periods     -poll $LOADPOLL
     856    periods     -exec 30
     857    periods     -timeout 300
     858    npending    1
     859
     860    task.exec
     861        stderr $LOGSUBDIR/pstamp.stopfaulted.log
     862        stderr $LOGSUBDIR/pstamp.stopfaulted.log
     863        $run = pstampstopfaulted
     864        if ($DB:n == 0)
     865            option DEFAULT
     866        else
     867            $run = $run $PS_DBSERVER -dbname $DB:$pstampStopFaulted_DB
     868            $pstampStopFaulted_DB ++
     869            if ($pstampStopFaulted_DB >= $DB:n) set pstampStopFaulted_DB = 0
     870        end
     871        add_poll_args run
     872        add_poll_labels run
     873        command $run
     874    end
     875
     876    task.exit $EXIT_SUCCESS
     877        # nothing to do
     878    end
     879
     880    task.exit   default
     881        showcommand failure
     882    end
     883
     884    task.exit   crash
     885        showcommand crash
     886    end
     887
     888    task.exit   timeout
     889        showcommand timeout
     890    end
     891end
Note: See TracChangeset for help on using the changeset viewer.