Package com.google.appengine.api.taskqueue

Examples of com.google.appengine.api.taskqueue.Queue


    public void launchForUpdate(Long userID, lv.odylab.evemanage.domain.eve.Character character) {
        logger.info("Scheduling blueprint update tasks");
        List<Blueprint> characterBlueprints = blueprintDao.getAll(new Key<User>(User.class, userID), character.getCharacterID());
        for (Blueprint blueprint : characterBlueprints) {
            logger.info("Scheduling blueprint update task for blueprintID: {}, userID: {}", blueprint.getId(), userID);
            Queue queue = appEngineServices.getQueue(queueName);
            TaskOptions taskOptions = withUrl(TASK_UPDATE_BLUEPRINT).param("userID", String.valueOf(userID))
                    .param("blueprintID", String.valueOf(blueprint.getId()))
                    .param("characterID", String.valueOf(character.getCharacterID()))
                    .param("characterName", character.getName());
            if (character.getCorporationID() != null) {
                taskOptions.param("corporationID", String.valueOf(character.getCorporationID()))
                        .param("corporationName", character.getCorporationName())
                        .param("corporationTicker", character.getCorporationTicker());
            }
            if (character.getAllianceID() != null) {
                taskOptions.param("allianceID", String.valueOf(character.getAllianceID()))
                        .param("allianceName", character.getAllianceName());
            }
            queue.add(taskOptions);
        }
    }
View Full Code Here


    public void launchForDetach(Long userID, Character character) {
        logger.info("Scheduling blueprint update for detach tasks");
        List<Blueprint> characterBlueprints = blueprintDao.getAll(new Key<User>(User.class, userID), character.getCharacterID());
        for (Blueprint blueprint : characterBlueprints) {
            logger.info("Scheduling blueprint update for detach task for blueprintID: {}, userID: {}", blueprint.getId(), userID);
            Queue queue = appEngineServices.getQueue(queueName);
            TaskOptions taskOptions = withUrl(TASK_UPDATE_BLUEPRINT).param("userID", String.valueOf(userID))
                    .param("blueprintID", String.valueOf(blueprint.getId()))
                    .param("characterID", String.valueOf(character.getCharacterID()))
                    .param("characterName", character.getName());
            queue.add(taskOptions);
        }
    }
View Full Code Here

    public void launchForDelete(Long userID, Long characterID) {
        logger.info("Scheduling blueprint update for delete tasks");
        List<Blueprint> characterBlueprints = blueprintDao.getAll(new Key<User>(User.class, userID), characterID);
        for (Blueprint blueprint : characterBlueprints) {
            logger.info("Scheduling blueprint update for delete task for blueprintID: {}, userID: {}", blueprint.getId(), userID);
            Queue queue = appEngineServices.getQueue(queueName);
            TaskOptions taskOptions = withUrl(TASK_UPDATE_BLUEPRINT).param("userID", String.valueOf(userID))
                    .param("blueprintID", String.valueOf(blueprint.getId()));
            queue.add(taskOptions);
        }
    }
View Full Code Here

        this.queueName = queueName;
    }

    public void launchForAll() {
        logger.info("Scheduling api key update tasks");
        Queue queue = appEngineServices.getQueue(queueName);
        Iterable<Key<User>> userKeys = userDao.getAllKeys();
        for (Key<User> userKey : userKeys) {
            logger.info("Scheduling api keys update for userID: {}", userKey.getId());
            queue.add(withUrl(TASK_UPDATE_API_KEY).param("userID", String.valueOf(userKey.getId())));
        }
    }
View Full Code Here

        this.queueName = queueName;
    }

    public void launchForAll() {
        logger.info("Scheduling blueprint for consistency check");
        Queue queue = appEngineServices.getQueue(queueName);
        Iterable<Key<Blueprint>> blueprintKeys = blueprintDao.getAllKeys();
        for (Key<Blueprint> blueprintKey : blueprintKeys) {
            logger.info("Scheduling blueprint for consistency check: {}", blueprintKey.getId());
            queue.add(withUrl(TASK_CHECK_BLUEPRINT).param("blueprintID", String.valueOf(blueprintKey.getId())));
        }
    }
View Full Code Here

        this.queueName = queueName;
    }

    public void launchForAll() {
        logger.info("Scheduling price set for consistency check");
        Queue queue = appEngineServices.getQueue(queueName);
        Iterable<Key<PriceSet>> priceSetKeys = priceSetDao.getAllKeys();
        for (Key<PriceSet> priceSetKey : priceSetKeys) {
            logger.info("Scheduling price set for consistency check: {}", priceSetKey.getId());
            queue.add(withUrl(TASK_CHECK_PRICE_SET).param("priceSetID", String.valueOf(priceSetKey.getId())));
        }
    }
View Full Code Here

      //HttpURLConnection connection = (HttpURLConnection)(new URL(url + "?" + query).openConnection());
      String key = "hud_xml_url";
      String value = URLEncoder.encode(hud_xml_url, charset);
      System.out.println("value is:" + value);
      System.out.println("rosieBackendAddress is: " + rosieBackendAddress);
      Queue queue = QueueFactory.getDefaultQueue();
      //queue the task and quickly return to the client
      //they'll have to get the blob id in another call
      queue.add(withUrl("/rosie").param(key, value).header("Host", rosieBackendAddress).method(Method.GET));
      //connection.setRequestProperty("Accept-Charset", charset);
      //connection.setRequestMethod("GET");
      //connection.setConnectTimeout(0);
      //connection.connect();
    //InputStream in = connection.getInputStream();
View Full Code Here

      assignment = pm.makePersistent(assignment);

      String description = assignment.getDescription();
      String assignmentId = assignment.getId().toString();

      Queue queue = QueueFactory.getDefaultQueue();
      String namespace = NamespaceManager.get();
      if (namespace == null) {
        namespace = "";
      }
      queue.add(withUrl("/tasks/CreatePlaylist").method(Method.POST)
          .param("assignmentId", assignmentId).param("title", title)
          .param("description", description).param("channelId", channelId)
          .param("ns", namespace));

      picasaApiHelper.setAuthSubTokenFromConfig();
      if (adminConfigDao.getAdminConfig().getPhotoSubmissionEnabled()
          && picasaApiHelper.isAuthenticated()) {
        queue.add(withUrl("/tasks/CreateAlbum").method(Method.POST)
          .param("assignmentId", assignmentId).param("title", title)
          .param("description", description).param("status", ModerationStatus.APPROVED.toString())
          .param("channelId", channelId).param("ns", namespace));
        queue.add(withUrl("/tasks/CreateAlbum").method(Method.POST)
          .param("assignmentId", assignmentId).param("title", title)
          .param("description", description).param("status", ModerationStatus.UNREVIEWED.toString())
          .param("channelId", channelId).param("ns", namespace));
        queue.add(withUrl("/tasks/CreateAlbum").method(Method.POST)
          .param("assignmentId", assignmentId).param("title", title)
          .param("description", description).param("status", ModerationStatus.REJECTED.toString())
          .param("channelId", channelId).param("ns", namespace));
      } else {
        log.info("Photo submissions are: " + (adminConfigDao.getAdminConfig().getPhotoSubmissionEnabled() ? "enabled" : "disabled"));
View Full Code Here

          photoEntry.setOriginalFileName(blobInfo.getFilename());
         
          pmfUtil.persistJdo(photoEntry);
        }
       
        Queue queue = QueueFactory.getDefaultQueue();
        queue.add(withUrl("/tasks/MoveToPicasa").method(Method.POST)
          .param("id", submissionId).param("ns", namespace)
          .countdownMillis(TASK_DELAY));
      } else {
        LOG.warning("No valid photos found in upload.");
      }
View Full Code Here

          photoEntry.setOriginalFileName(fileName);
          pmfUtil.persistJdo(photoEntry);
        }
      }
     
      Queue queue = QueueFactory.getDefaultQueue();
      queue.add(withUrl("/tasks/MoveToPicasa").method(Method.POST).param("id", submissionId)
        .param("ns", namespace).countdownMillis(TASK_DELAY));
    } catch (MessagingException e) {
      LOG.log(Level.WARNING, "", e);
      response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
    } catch (IllegalArgumentException e) {
View Full Code Here

TOP

Related Classes of com.google.appengine.api.taskqueue.Queue

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.