Examples of countdownMillis()


Examples of com.google.appengine.api.labs.taskqueue.TaskOptions.countdownMillis()

                url.param(key, URLEncoder.encode(values[0], UTF8));
            }
           
            // Task queue implements the exponential backoff
            long jitter = (int) Math.random() * C2DM_MAX_JITTER_MSEC;
            url.countdownMillis(jitter);
           
            TaskHandle add = dmQueue.add(url);
        } catch (UnsupportedEncodingException e) {
            // Ignore - UTF8 should be supported
            log.log(Level.SEVERE, "Unexpected error", e);
View Full Code Here

Examples of com.google.appengine.api.taskqueue.TaskOptions.countdownMillis()

    t.param(AnalysisConstants.TIMESTAMP_PARAM, Long.toString(timestamp));
    t.param(AnalysisConstants.BUILTIN_DATASTORE_EXPORT_CONFIG, exporterConfig.getClass().getName());
   
    t.method(Method.GET);
    if (countdownMillis > 0) {
      t.countdownMillis(countdownMillis);
    }
    Queue queue;
    if (!AnalysisUtility.areParametersValid(exporterConfig.getQueueName())) {
      queue = QueueFactory.getDefaultQueue();
    }
View Full Code Here

Examples of com.google.appengine.api.taskqueue.TaskOptions.countdownMillis()

      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) {
View Full Code Here

Examples of com.google.appengine.api.taskqueue.TaskOptions.countdownMillis()

    protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
            throws javax.servlet.ServletException, java.io.IOException {
        TaskOptions taskOptions = TaskOptions.Builder.withDefaults();
        taskOptions.url(VERIFY_TASK_URL);
        taskOptions.method(Method.GET);
        taskOptions.countdownMillis(VERIFY_INTERVAL);
        QueueFactory.getDefaultQueue().add(taskOptions);
        this.logger.info("Next verification task scheduled at " + (VERIFY_INTERVAL / 60.0 / 60 / 1000)
                + " hours later.");

        try {
View Full Code Here

Examples of com.google.appengine.api.taskqueue.TaskOptions.countdownMillis()

    if (null != taskName) {
      taskOptions.taskName(taskName);
    }
    Long delaySeconds = task.getDelaySeconds();
    if (null != delaySeconds) {
      taskOptions.countdownMillis(delaySeconds * 1000L);
    }
    return taskOptions;
  }

  @SuppressWarnings("unchecked")
View Full Code Here

Examples of com.google.appengine.api.taskqueue.TaskOptions.countdownMillis()

        for(Entry<String, Object> e : params.entrySet()) {
            String key = e.getKey();
            Object value = e.getValue();
            switch (key) {
                case "countdownMillis":
                    options = options.countdownMillis(((Number)value).longValue());
                    break;
                case "etaMillis":
                    options = options.etaMillis(((Number)value).longValue());
                    break;
                case "taskName":
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.