Examples of endAndJoin()


Examples of net.greghaines.jesque.worker.WorkerPool.endAndJoin()

        try {
            // TODO: Do client stuff here
        } finally {
            TestUtils.stopWorker(admin, adminThread);
            try {
                workerPool.endAndJoin(false, 1000);
            } catch (Exception e) {
                log.warn("Exception while waiting for workerThread to join", e);
            }
        }
    }
View Full Code Here

Examples of net.greghaines.jesque.worker.WorkerPool.endAndJoin()

        enqueue();

        // Wait a few seconds then shutdown
        try { Thread.sleep(15000); } catch (Exception e){} // Give ourselves time to process
        CLIENT.end();
        try { workerPool.endAndJoin(true, 100); } catch (Exception e){ e.printStackTrace(); }
    }

    public static void enqueue() {
        final long future = System.currentTimeMillis() + 5;
        final Job job = new Job(TestAction.class.getSimpleName());
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.