IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25549


Ignore:
Timestamp:
Sep 24, 2009, 2:18:10 PM (17 years ago)
Author:
bills
Message:

add a task to revert faulted jobs periodically

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/pstamp.pro

    r25282 r25549  
    88$pstampJob_DB = 0
    99$pstampFin_DB = 0
     10$pstampRev_DB = 0
    1011
    1112# set PS_DBSERVER if postage stamp database host is not the same as the value for DBSERVER in site.config
     
    5253        active true
    5354    end
    54 end
     55    task pstamp.job.revert
     56        active true
     57    end
     58end
     59
    5560
    5661macro pstamp.off
     
    7580    end
    7681    task pstamp.job.run
     82        active false
     83    end
     84    task pstamp.job.revert
     85        active false
     86    end
     87end
     88
     89macro pstamp.revert.on
     90    task pstamp.job.revert
     91        active true
     92    end
     93end
     94macro pstamp.revert.off
     95    task pstamp.job.revert
    7796        active false
    7897    end
     
    430449    end
    431450end
     451
     452task pstamp.job.revert
     453    host        local
     454
     455    periods     -poll $LOADPOLL
     456    periods     -exec 180
     457    periods     -timeout 300
     458    npending    1
     459
     460    task.exec
     461        $run = pstamptool -revertjob -all
     462        if ($DB:n == 0)
     463            option DEFAULT
     464        else
     465            $run = $run $PS_DBSERVER -dbname $DB:$pstampRev_DB
     466            $pstampRev_DB ++
     467            if ($pstampRev_DB >= $DB:n) set pstampRev_DB = 0
     468        end
     469        add_poll_args run
     470        # add_poll_labels run
     471        command $run
     472    end
     473
     474    task.exit $EXIT_SUCCESS
     475        # nothing to do
     476    end
     477
     478    task.exit   default
     479        showcommand failure
     480    end
     481
     482    task.exit   crash
     483        showcommand crash
     484    end
     485
     486    task.exit   timeout
     487        showcommand timeout
     488    end
     489end
     490
Note: See TracChangeset for help on using the changeset viewer.