Examples of peekReady()


Examples of com.surftools.BeanstalkClient.Client.peekReady()

    // note we adjust delay
    long jobId = client.put(65536, delaySeconds, 120, srcString.getBytes());
    assertTrue(jobId > 0);

    // peekReady (but we still can't reserve because of tube delay)
    Job job = client.peekReady();
    assertNotNull(job);
    assertEquals(jobId, job.getJobId());

    // reserve with timeout a little less than tube pause time
    job = client.reserve(tubeDelay - 1);
View Full Code Here

Examples of com.surftools.BeanstalkClient.Client.peekReady()

    }

    // peek 'em once
    Job job = null;
    for (int i = 0; i < nJobs; ++i) {
      job = client.peekReady();
      assertNotNull(job);
      assertEquals(jobIds[0], job.getJobId());
    }

    // reserve and delete
View Full Code Here

Examples of com.surftools.BeanstalkClient.Client.peekReady()

      client.delete(job.getJobId());
    }

    // peek one last time
    for (int i = 0; i < nJobs; ++i) {
      job = client.peekReady();
      assertNull(job);
    }

    popWatchedTubes(client, tubeNames);
  }
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.