Package io.lumify.core.model.workQueue

Examples of io.lumify.core.model.workQueue.WorkQueueRepository


        UserStatus status = UserStatus.OFFLINE;
        LOGGER.info("setting userId %s status to %s", userId, status);
        try {
            UserRepository userRepository = InjectHelper.getInstance(UserRepository.class);
            User user = userRepository.setStatus(userId, status);
            WorkQueueRepository workQueueRepository = InjectHelper.getInstance(WorkQueueRepository.class);
            workQueueRepository.pushUserStatusChange(user, status);
        } catch (Exception ex) {
            LOGGER.error("exception while setting userId %s status to %s", userId, status, ex);
        }
    }
View Full Code Here


        int threadCount = Integer.parseInt(config.get(Configuration.LONG_RUNNING_PROCESS_RUNNER_THREAD_COUNT, "4"));

        final LongRunningProcessRunner longRunningProcessRunner = InjectHelper.getInstance(LongRunningProcessRunner.class);
        longRunningProcessRunner.prepare(config.toMap());
        final WorkQueueRepository workQueueRepository = InjectHelper.getInstance(WorkQueueRepository.class);

        for (int i = 0; i < threadCount; i++) {
            Thread t = new Thread(new Runnable() {
                @Override
                public void run() {
                    while (true) {
                        WorkQueueRepository.LongRunningProcessMessage longRunningProcessMessage = workQueueRepository.getNextLongRunningProcessMessage();
                        if (longRunningProcessMessage == null) {
                            continue;
                        }
                        try {
                            longRunningProcessRunner.process(longRunningProcessMessage.getMessage());
View Full Code Here

TOP

Related Classes of io.lumify.core.model.workQueue.WorkQueueRepository

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.