Examples of QueueSettings


Examples of com.google.appengine.tools.pipeline.impl.QueueSettings

  }

  private Task createTask() {
    String name = GUIDGenerator.nextGUID();
    Key key = KeyFactory.createKey("testType", name);
    Task task = new RunJobTask(key, new QueueSettings().setModuleVersion("m1"));
    return task;
  }
View Full Code Here

Examples of com.google.appengine.tools.pipeline.impl.QueueSettings

    this.taskName = taskName;
    this.queueSettings = queueSettings;
  }

  protected Task(Type type, String taskName, Properties properties) {
    this(type, taskName, new QueueSettings());
    for (TaskProperty taskProperty : TaskProperty.ALL) {
      taskProperty.applyFrom(this, properties);
    }
  }
View Full Code Here

Examples of com.google.appengine.tools.pipeline.impl.QueueSettings

    }
    return taskHandles;
  }

  private TaskOptions toTaskOptions(Task task) {
    final QueueSettings queueSettings = task.getQueueSettings();
    TaskOptions taskOptions = TaskOptions.Builder.withUrl(TaskHandler.HANDLE_TASK_URL);
    if (queueSettings.getOnBackend() != null) {
      taskOptions.header("Host", BackendServiceFactory.getBackendService().getBackendAddress(
          queueSettings.getOnBackend()));
    } else {

      String versionHostname = RetryHelper.runWithRetries(new Callable<String>() {
        @Override
        public String call() {
          ModulesService service = ModulesServiceFactory.getModulesService();
          String module = queueSettings.getOnModule();
          String version = queueSettings.getModuleVersion();
          if (module == null) {
            module = service.getCurrentModule();
            version = service.getCurrentVersion();
          }
          return service.getVersionHostname(module, version);
        }
      }, RetryParams.getDefaultInstance(), MODULES_EXCEPTION_HANDLER);
      taskOptions.header("Host", versionHostname);
    }

    Long delayInSeconds = queueSettings.getDelayInSeconds();
    if (null != delayInSeconds) {
      taskOptions.countdownMillis(delayInSeconds * 1000L);
      queueSettings.setDelayInSeconds(null);
    }
    addProperties(taskOptions, task.toProperties());
    String taskName = task.getName();
    if (null != taskName) {
      taskOptions.taskName(taskName);
View Full Code Here

Examples of com.google.appengine.tools.pipeline.impl.QueueSettings

      }
    }
    if (async) {
      // We do all the checks above before bothering to enqueue a task.
      // They will have to be done again when the task is processed.
      DeletePipelineTask task = new DeletePipelineTask(rootJobKey, force, new QueueSettings());
      taskQueue.enqueue(task);
      return;
    }
    deleteAll(JobRecord.DATA_STORE_KIND, rootJobKey);
    deleteAll(Slot.DATA_STORE_KIND, rootJobKey);
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.