Package org.fluxtream.core.domain

Examples of org.fluxtream.core.domain.UpdateWorkerTask$AuditTrailEntry


    }

    @Override
    @Transactional(readOnly=false, propagation = Propagation.REQUIRES_NEW)
    public void unclaimTask(final long taskId) {
        UpdateWorkerTask task = em.find(UpdateWorkerTask.class, taskId);
        if (task!=null) {
            task.serverUUID = null;
            task.status = UpdateWorkerTask.Status.SCHEDULED;
        }
    }
View Full Code Here


                // We're the first to find out that quota is gone.  We may or may not have succeeded on this call,
                // depending on the status code.  Regardless of the status code, fix the scheduling of moves updates
                // that would otherwise happen before the next quota window opens up.
                List<UpdateWorkerTask> updateWorkerTasks = connectorUpdateService.getScheduledUpdateWorkerTasksForConnectorNameBeforeTime("moves", nextQuotaAvailableTime);
                for (int i=0; i<updateWorkerTasks.size(); i++) {
                    UpdateWorkerTask updateWorkerTask = updateWorkerTasks.get(i);
                    // Space the tasks 30 seconds apart so they don't all try to start at the same time
                    long rescheduleTime = nextQuotaAvailableTime + i*(DateTimeConstants.MILLIS_PER_SECOND*30);

                    // Update the scheduled execution time for any moves tasks that would otherwise happen during
                    // the current quota outage far enough into the future that we should have quota available by then.
                    // If there's more than one pending, stagger them by a few minutes so that they don't all try to
                    // happen at once.  The reason the "incrementRetries" arg is true is that that appears to be the
                    // way to prevent spawning a duplicate entry in the UpdateWorkerTask table.
                    connectorUpdateService.reScheduleUpdateTask(updateWorkerTask.getId(),
                                                                rescheduleTime,
                                                                true,null);

                    logger.info("module=movesUpdater component=fetchMovesAPI action=fetchMovesAPI" +
                                " message=\"Rescheduling due to quota limit: " +
View Full Code Here

TOP

Related Classes of org.fluxtream.core.domain.UpdateWorkerTask$AuditTrailEntry

Copyright © 2018 www.massapicom. 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.