Examples of ScheduleExecution


Examples of org.qzerver.model.domain.entities.job.ScheduleExecution

        executionParameters.setFired(parameters.getFiredTime());
        executionParameters.setManual(false);
        executionParameters.setComment(null);
        executionParameters.setAddresses(null);

        ScheduleExecution scheduleExecution = executeJob(scheduleJobId, executionParameters);

        if (scheduleExecution.getStatus() != ScheduleExecutionStatus.SUCCEED) {
            ScheduleJob scheduleJob = scheduleExecution.getJob();
            if (scheduleJob.isNotifyOnFailure()) {
                mailService.notifyJobExecutionFailed(scheduleExecution);
            }
        }
View Full Code Here

Examples of org.qzerver.model.domain.entities.job.ScheduleExecution

    protected ScheduleExecution executeJob(long scheduleJobId, StartExecutionParameters parameters) {
        BeanValidationUtils.checkValidity(parameters, beanValidator);

        // Compose execution descriptor
        ScheduleExecution scheduleExecution = executionManagementService.startExecution(scheduleJobId, parameters);

        // The only reason the status is not assigned is that exception occurs in executeJobNodes*() call
        ScheduleExecutionStatus status = ScheduleExecutionStatus.EXCEPTION;

        // Try to execute action on a node from the cluster
        try {
            try {
                if (scheduleExecution.isAllNodes() && (scheduleExecution.getAllNodesPool() > 0)) {
                    status = executeJobNodesParallel(scheduleExecution);
                } else {
                    status = executeJobNodesSequentially(scheduleExecution);
                }
            } catch (Exception e) {
                LOGGER.error("Internal error while executing the job : " + scheduleExecution.getJob().getId(), e);
            } finally {
                scheduleExecution = executionManagementService.finishExecution(scheduleExecution.getId(), status);
            }
        } catch (AbstractServiceException e) {
            throw new SystemIntegrityException("Fail to finish execution", e);
        }

View Full Code Here

Examples of org.qzerver.model.domain.entities.job.ScheduleExecution

        Iterator<ScheduleExecutionNode> nodeIterator = scheduleExecution.getNodes().iterator();

        // Start loop throught all execution nodes
        while (nodeIterator.hasNext()) {
            // Get fresh copy of execution and check the cancellation flag
            ScheduleExecution scheduleExecutionReloaded =
                executionManagementService.findExecution(scheduleExecution.getId());
            if (scheduleExecutionReloaded.isCancelled()) {
                LOGGER.debug("Execution [{}] is cancelled", scheduleExecution.getId());
                return ScheduleExecutionStatus.CANCELED;
            }

            // Current node
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.