Package com.google.appengine.api.labs.taskqueue

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


        batchcount++;
        Cursor cursor = JDOCursorHelper.getCursor(results);
        cursorString = cursor.toWebSafeString();
        // for efficiency, add next job to queue before processing this one
        Queue queue = QueueFactory.getQueue("frfeedupdates");
        queue.add(url("/feedupdate").param("cursor", cursorString).param("num",
          ""+batch).param("max", ""+max).param("bc", ""+batchcount));
         
        for (FeedInfo f : results) {
          //  update the feed if needed [if the feed has just been updated,
          // it will not be fetched again within the defined latency period]
View Full Code Here


        logger.info("migrating up: " + mg);
        res = mg.migrate_up(cursor, range, params);
        cursor = res.get("cursor");
      }
      if (cursor != null) {
        Queue queue = QueueFactory.getDefaultQueue();
        TaskOptions topt = TaskOptions.Builder.url("/migration");
        for (String rkey : res.keySet()) {
          if (!rkey.equals("cursor")) {
            topt = topt.param(rkey, ""+ res.get(rkey));
          }
        }
        queue.add(topt.param("cursor", cursor).param("num", ""+range).
          param("dir", direction).param("migration", migration));
      }
    }
    catch (ClassNotFoundException e) {
      // e.printStackTrace();
View Full Code Here

    PersistenceManager pm = PMF.getNonTxnPm();

    try {
      UserAccount user = LoginHelper.getLoggedInUser(getThreadLocalRequest().getSession(), pm);
      Queue queue = QueueFactory.getQueue("userfeedupdates");
      // add a task to update all feeds for the friends of the given user.
      // the 'notify' parameter will trigger channel API notification
      // afterwards (if channel API is enabled)
      queue.add(url("/feedupdateuser").param("uid", user.getUniqueId()).param("notify", "true"));
    }
    catch (Exception e) {
      logger.warning(e.getMessage());
      return false;
    }
View Full Code Here

    public void init() {
        scheduleGAETask();
    }

    private void scheduleGAETask() {
        Queue queue = QueueFactory.getDefaultQueue();
        queue.add(url("/scheduler"));
    }
View Full Code Here

TOP

Related Classes of com.google.appengine.api.labs.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.