Package net.greghaines.jesque

Examples of net.greghaines.jesque.Job


  @Test
  public void shouldAddJobWithArguments() {
    worker.togglePause(true);
    Object[] args = new Object[]{1, 2.3, true, "test", Arrays.asList("inner", 4.5)};
    Job job = new Job(MockJobArgs.class.getName(), args);
    jesqueClient.enqueue("JESQUE_QUEUE", job);
    worker.togglePause(false);
  }
View Full Code Here


  }

  @Test
  public void shouldAddJobWithEmptyArguments() {
    worker.togglePause(true);
    Job job = new Job(MockJob.class.getName(), new Object[]{});
    jesqueClient.enqueue("JESQUE_QUEUE", job);
    worker.togglePause(false);

  }
View Full Code Here

  }

  @Test
  public void shouldRegisterFailJob() {
    Job job = new Job(MockJobFail.class.getName(), new Object[]{});
    jesqueClient.enqueue("JESQUE_QUEUE", job);
    waitJob(3000);
    Assert.assertEquals(1, failureDAO.getCount());
  }
View Full Code Here

TOP

Related Classes of net.greghaines.jesque.Job

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.