Package com.google.appengine.tools.pipeline.impl.tasks

Examples of com.google.appengine.tools.pipeline.impl.tasks.CancelJobTask


   */
  public static void cancelJob(String jobHandle) throws NoSuchObjectException {
    checkNonEmpty(jobHandle, "jobHandle");
    Key key = KeyFactory.createKey(JobRecord.DATA_STORE_KIND, jobHandle);
    JobRecord jobRecord = backEnd.queryJob(key, InflationType.NONE);
    CancelJobTask cancelJobTask = new CancelJobTask(key, jobRecord.getQueueSettings());
    try {
      backEnd.enqueue(cancelJobTask);
    } catch (TaskAlreadyExistsException e) {
      // OK. Some other thread has already enqueued this task.
    }
View Full Code Here


  }

  private static void cancelChildren(JobRecord jobRecord, Key failedChildKey) {
    for (Key childKey : jobRecord.getChildKeys()) {
      if (!childKey.equals(failedChildKey)) {
        CancelJobTask cancelJobTask = new CancelJobTask(childKey, jobRecord.getQueueSettings());
        try {
          backEnd.enqueue(cancelJobTask);
        } catch (TaskAlreadyExistsException e) {
          // OK. Some other thread has already enqueued this task.
        }
View Full Code Here

TOP

Related Classes of com.google.appengine.tools.pipeline.impl.tasks.CancelJobTask

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.