コード例 #1
0
    def post(self):
        cookie = self.request.get("mcookie")
        logging.info("TaskWorker: " + str(cookie))

        ufp = UrlFetchProxy()
        u = ufp.fetch("http://example.com/some/stuff")

        params = {"mcookie": cookie}
        if not u.content.find("this is sample3") >= 0:
            # Add the task to the default queue.
            TaskQueueProxy.add(url="/tasks/worker", params=params)
コード例 #2
0
    def start(self):
        logging.info("TaskStarter:")
        cookie = "acookie"

        # Add the task to the default queue.
        TaskQueueProxy.add(url="/tasks/worker", params={"mcookie": cookie})