Menu
  • HOME
  • TAGS

How do I check the number of tasks currently in the queue?

Tag: google-app-engine,push-queue

According to the Push queue in GAE there are a number of task request headers.

X-AppEngine-QueueName, the name of the queue (possibly default)
X-AppEngine-TaskName, the name of the task, or a system-generated unique ID if no name was specified
X-AppEngine-TaskRetryCount, the number of times this task has been retried; for the first attempt, this value is 0. This number includes attempts where the task failed due to a lack of available instances and never reached the execution phase.
X-AppEngine-TaskExecutionCount, the number of times this task has previously failed during the execution phase. This number does not include failures due to a lack of available instances.
X-AppEngine-TaskETA, the target execution time of the task, specified in milliseconds since January 1st 1970.

Is there a way to check how many tasks are already enqueued?

Best How To :

Not from the headers, no. But you can use the QueueStatistics class to query that information.

serving GAE applications over http

java,google-app-engine,ssl

There two things you've missed from docs: Google Cloud Endpoints requires SSL. If you need to access your backend API in a system not supporting SSL, you'll need to either update the system to support SSL or use a proxy. and Google Cloud Endpoints does not support custom domains. See...

In terms of back-end and front-end technology, what can GAE do that Web Hosting can't? [closed]

google-app-engine,web-hosting,lamp,paas,web-technologies

Adding to @Andrei's answer, the App Engine is all about a Platform as a Service (PAAS). For example, you wrote: In my mind - all I can picture is that they both serve HTML pages, CSS & JS files, images, videos, music, maybe pull data from a relational database, allow...

jquery google app engine

jquery,google-app-engine

You need to import jquery. Try this fiddle $(document).ready(function() { $('img').click(function() { $(this).fadeOut('slow'); }); $('p').click(function() { $(this).fadeOut('slow'); }); alert("hi"); }); <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript" src="/js/script.js"></script> </head> <img src="http://www.w3schools.com/images/w3schools.png"/> <p>Click Me</p> ...

Getting user credentials using Google+ API

android,google-app-engine,google-api,google-api-java-client

I have tried same code and its working fine! So, just ensure two things: 1)Register your digitally signed .apk file's public certificate in the Google APIs Console.Link below: https://developers.google.com/+/mobile/android/getting-started#step_1_enable_the_google_api 2)Make sure you have added the google+ api access and have client key created with SHA1. Rest is fine....

Google App Engine datastore: filter()

python,google-app-engine

object.__nonzero__: Called to implement truth value testing and the built-in operation bool(); should return False or True, or their integer equivalents 0 or 1. When this method is not defined, __len__() is called, if it is defined, and the object is considered true if its result is nonzero. If a...

Choosing specific ports on local development server for non-default modules

java,google-app-engine,android-studio,gradle,app-engine-modules

@crazystick answered it for Maven. Here's the same solution re-done for Gradle: apply plugin: ear ... appengine { downloadSdk = true httpAddress = "0.0.0.0" jvmFlags = ['-Dcom.google.appengine.devappserver_module.default.port=8080', '-Dcom.google.appengine.devappserver_module.module1.port=8081'] appcfg { email = "[email protected]" oauth2 = true } } ...

How to use CachedRowSet in Google App Engine?

java,google-app-engine,jdbc,resultset,google-cloud-endpoints

CahecRowSet is an interface so obviously this is whitelisted. Interface CachedRowSet I am guessing you are connecting a Google CloudSQL instance. from the javadoc : A CachedRowSet object is a container for rows of data that caches its rows in memory, which makes it possible to operate without always being...

jQuery ajax() success data - retrieving object results from Python server

jquery,python,ajax,google-app-engine,ajaxform

You need to JSON encode the data like Shaunak D described. The error you're getting is telling you that the json package doesn't know how encode your ajaxObject instance into a string. You can use a custom JSON encoder to fix this as detailed at https://docs.python.org/2/library/json.html (section "Extending JSONEncoder") Alternatively...

Profiling memory usage on App Engine

python,google-app-engine,memory

GAE Mini Profiler does provide memory stats if you use the sampling profiler and set memory_sample_rate nonzero; at each snapshot it will tell you the memory that was in use. You will want to turn the sample frequency way down as the memory sample takes a few ms to execute....

Check if a queue is empty in Google App Engine

python,django,google-app-engine,task-queue

You can use the QueueStatistics class statsList = taskqueue.QueueStatistics.fetch([taskqueue.Queue("foo"), taskqueue.Queue("bar")]) https://cloud.google.com/appengine/docs/python/taskqueue/queue_statistics#QueueStatistics_queue...

Google-App-Engine[PHP]: Error trying to establish database connection

php,mysql,database,wordpress,google-app-engine

To whom, this may interest I have solved this problem with a work around. Since I was following the instructions from the web page: https://googlecloudplatform.github.io/appengine-php-wordpress-starter-project/ I researched further on the contributors behind this helpful webpage, leading to the GitHub link: https://github.com/GoogleCloudPlatform/appengine-php-wordpress-starter-project Considering that this is updated up to this year...

Sending mail by Unauthorised sender in Google AppEngine

python,google-app-engine,email,sendmail

From https://cloud.google.com/appengine/docs/python/mail/emailmessagefields sender The email address of the sender, the From address. The sender address must be one of the following types: The address of a registered administrator for the application. You can add administrators to an application using the Administration Console. The address of the user for the current...

Cloud Endpoints with Cloud SQL sample code

java,google-app-engine,google-cloud-endpoints,google-cloud-sql

Here is an example Cloud Endpoint class that updates Cloud SQL. The example assumes the end point is authenticated import java.io.IOException; import java.util.HashSet; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; import com.google.api.server.spi.ServiceException; import com.google.api.server.spi.config.Api; import com.google.api.server.spi.config.ApiMethod; import com.google.api.server.spi.config.Named; import com.google.api.server.spi.response.ForbiddenException; import...

GAE Managed VMs: Possible to use C-based Python libraries with standard runtime?

python,google-app-engine

The standard runtime is fine, you just need to add your extra dependencies to the Dockerfile that gets created. The tutorial in the docs (specifically Step 6) shows an example of building a python app that uses a C-extension.

How can I create a docker image from the current system?

google-app-engine,docker,boot2docker

You can SSH into the Container, make changes and then you can commit the container, which will save your changes to an image. You can now push this image to registry. Unless you are using a data container, all your changes are saved.

Do we HAVE to generate and use client libraries to use Google App Engine's Endpoints?

ios,swift,rest,google-app-engine,google-cloud-endpoints

Yes, it's totally possible to access endpoints via HTTP requests. The client libraries just help you to generate those requests without having to know the exact URLs. The biggest part where the client libraries help you is for authentication, but if you authenticate with Google and get an access token...

Polymer & google cloud endpoints golang backend

google-app-engine,polymer,google-cloud-endpoints

Some notes: google-client-loader is the one you want Until a new release you will have to depend on #master (as you are doing already) since the root/apiRoot fix hasn't been released yet . With Polymer 1.0 camel-cased attributes become lowercase so passing in apiRoot would actually be an apirootproperty. What...

No module named _mysql - Google App Engine & Django

python,mysql,django,google-app-engine

I've finally found a workaround. Simply adding MySQLdb to your GAE lib is not enough. MySQLdb tries to import _mysql which is a .so or .c file depends on what version of MySQLdb you use. It seems like importing them directly is not working correctly I suppose. Maybe because it's...

I am working on small project with Google AppEngine (Python), tutored by Udacity. I am unable to render user comments to main page

python-2.7,google-app-engine,gae-datastore,jinja2

You've confused yourself with the way you've named your variables. You send the list of comments to the template as "comment", then iterate through that using "content" for each item, but then revert back to using "comment" instead. You should give your things logical names that reflects what they are....

Google App Engine performance setting : Some performance settings must be changed via Module configuration files

java,google-app-engine

Google has disabled the performance panel. The only option left is to configure through appengine-web.xml. Thanks....

How to get a response for a streaming url on google app engine (python)

python,google-app-engine,urllib2,urlfetch

UrlFetch is meant for fetching a finite resource from a URL, and generally doesn't play nice with streams. It's waiting for the request to terminate. I believe that the endpoint doesn't play well with Range requests in general. Look at the headers when my browser hits that stream (great stream...

Arguments to Endpoints method change order

android,google-app-engine,google-cloud-endpoints

AS you can read here [1]: Method parameters in the generated client library are in alphabetical order, regardless of the original order in the backend method. As a result, you should be careful when editing your methods, especially if there are several parameters of the same type. The compiler will...

Google App Engine - Writing app.yaml for a particular url like applicationName.appspot.com/docs/ec-quickstart/index.html

python,css,google-app-engine,hosting

You need to specify rules for every piece you're going to serve and construct your html to reference them accordingly. Pay attention to the patterns as the 1st match will be used even if a more specific one follows below. The 1st attempt doesn't specify where your .css file exists....

Designing an API on top of BigQuery

google-app-engine,bigdata,google-bigquery

Based on my experience analyzing performance of similar projects in BigQuery. If you are concerned with performance only, then you don't have to change anything. BigQuery's optimizer can figure out many things, and if query uses WHERE against only few days - the performance will be good. But from billing...

How to get public link for the uploaded file on google cloud storage in local dev server(Google App engine+JAVA)

java,google-app-engine,file-upload,google-cloud-platform

You can use the Images service on the local devserver. For that you need a blobkey: BlobstoreService blobStore = BlobstoreServiceFactory.getBlobstoreService(); BlobKey blobKey = blobStore.createGsBlobKey("/gs/" + filename.getBucketName() + "/" + filename.getObjectName())); // blobKey can be persisted ImagesService imagesService = ImagesServiceFactory.getImagesService(); String url = imagesService.getServingUrl(ServingUrlOptions.Builder.withBlobKey(image)); Resizing also works on the local devserver...

How many Async calls we can call in one request in Google App Engine

google-app-engine,asynchronous

There is no limit on the number of calls that App Engine can process in general. There are limits (quotas) set for different APIs: e.g. number of Mail API, Task API, URLFetch, etc. calls. Often quotas are different for paying customers, and in most cases you can request to increase...

viewing google app engine Python logging messages in CodeEnvy

python,google-app-engine,logging,cloud

When you use the logging library, the messages should be shown in Codenvy's console out of the box. To also see your custom logs in the Google Developers Console, You might have to supply logging.getLogger().setLevel(logging.DEBUG) import logging logging.getLogger().setLevel(logging.DEBUG) ... ... def get(self): logging.info('Starting feedback...') self.response.write('Processing form data...') feedback = self.request.get('content')...

Unable to deploy an application module on AppEngine

google-app-engine,google-app-engine-python

Incrementing the version (in the .yaml files), redeploying both modules, and activating the new version finally solved the problem.

Optimizing for Social Leaderboards

python,google-app-engine,optimization,twitter,leaderboard

I would organize the task like this: Make an asynchronous fetch call to the Twitter feed Use memcache to hold all the AuthAccount->User data: Request the data from memcache, if it doesn't exist then make a fetch_async() call to the AuthAccount to populate memcache and a local dict Run each...

Is it possible to use Google Cloud Endpoints built in authentication with Google+ Domains API?

google-app-engine,authentication,google-plus,google-cloud-endpoints,google-plus-domains

So, your use-case is: your users authenticate to your app, granting the basic userinfo.profile scope needed to get the com.google.appengine.api.users.User object properly received in your endpoints API you persist these User objects to the DB, and when you retrieve them to display the thread they commented in, you'd like to...

App Engine - NDB query with projection requires subproperty?

google-app-engine,gae-datastore,app-engine-ndb,google-app-engine-python

That query is not possible. Unfortunately the exception isn't very clear, but the issue is the result of how sub-properties are actually stored. ndb explodes your StructuredProperty so that each value is included separately. So, for example, the entity: Contact(name="Bob", addresses=[ Address(type="Work", city="San Francisco"), Address(type="Home", city="New York")]) This will get...

How can you get the Google+ Profile of the current user when using Google Cloud Endpoint's (Java) built in authentication?

google-app-engine,google-plus,google-cloud-endpoints

It is possible to get the user access token when using Google Cloud Endpoint's built in authentication. Add the parameter HttpServletRequest request to your Google Cloud endpoint as shown below. This will allow you to get the raw request. You will then need to retreive the header called Authentication. This...

What is the equivalent of BlobstoreLineInputReader for targeting Google Cloud Storage?

python,google-app-engine,mapreduce,pipeline

At first, I attempted thinkjson's CloudStorageLineInputReader but had no success. Then I found this pull request...which led me to rbruyere's fork. Despite some linting issues (like the spelling on GoolgeCloudStorageLineInputReader), however at the bottom of the pull request it is mentioned that it works fine, and asks if the project...

Google AppEngine channel is opened, client is receiving responses, but socket.onmessage is not being called

javascript,google-chrome,google-app-engine,long-polling,channel-api

We have been using this as well and faced the same issue, this workaround seems to work fine for us, assigning the onmessage after the socket is created: channel = new goog.appengine.Channel(token); socket = channel.open(); socket.onmessage = onMessage; ...

GAE DOMDocument::load(): I/O warning : failed to load external entity

javascript,php,json,google-app-engine

For security reason GAE disables external XML entity loading by default (See https://cloud.google.com/appengine/docs/php/#PHP_Functions_that_may_be_manually_enabled for more details). You'll need to call libxml_disable_entity_loader(false) before loading the XML.

GAE Python PyML ImportError: No module named _ckernel

python,google-app-engine,pyml

That code appears to be using swig. Appengine runtime sandbox limits 'c' based binary libs to a supported set. Swig typically implies compiled C/C++ wrapped in Python. So it would appear this can not run on appengine, unless they have a pure python option. You could run it under a...

Google App Engine: Unable to find 'increasing daily budget'

google-app-engine,payment

Using the new console, you can change your billing from your App Engine settings: https://console.developers.google.com/project/your-app-id/appengine/settings Make sure you've linked your project to a billing account. To do this, head over to your project-level settings: https://console.developers.google.com/project/your-app-id/settings If that still doesn't work, try the old console: https://appengine.google.com/billing/billing_status?&app_id=s~your-app-id. You must prepend the "s~"...

Google Appengine - Entity class is not enhanced

google-app-engine

I removed: /war/WEB-INF/lib/datanucleus-appengine-1.0.10.final.jar and also from my build path - problem solved....

AJAX call to Servlet Google App Engine (GAE)

java,ajax,jsp,google-app-engine,servlets

You cannot redirect using Ajax. That's the point of Ajax – it's asynchronous, separate from the "main thread". If you want to simply redirect either: Redirect in the Java code after doing some processing Have a link in the HTML – <a href="/register">Register!</a> If you definitely want to use JavaScript...

Scaling non-default version of Google App Engine Backend

python,google-app-engine

So it seems I can solve this problem using modules, which I switched a lot of my code to anyways for this iteration. Each module is capable of having its own default version. So, the first version of the app can still hit https://my-app.appspot.com, (and that will stay the default...

Google datastore multiple values for the same property

android,google-app-engine,gae-datastore,google-datastore

It should be: List<String> members = new ArrayList<String>(3); members.add("A"); members.add("B"); members.add("C"); Entity newGroup = new Entity("group"); newGroup.setProperty("member", members); datastore.put(newGroup); ...

Trying to download a file using Dropbox Java API in the GAE

java,google-app-engine

Got it! Thanks. ByteArrayOutputStream worked. So for anyone else trying to read a DropBox file in a Google App Engine environment (i.e. read into memory), here is what worked for me String fileName = "myfile.xml"; OutputStream out = new ByteArrayOutputStream(); try { dbxClient.getFile("/" + fileName, null, out); } catch (DbxException...

GAE webapp2 delete all UserTokens (drop all sessios) for specific user

python,google-app-engine,webapp2

I see two ways how to do that. First is to inherit from the UserToken class making user an indexed property. Then you can set the token_model class property to your new token model in your user class. Here is the code: class MyToken(UserToken): user = ndb.StringProperty(required=True) class MyUser(User): token_model...

upload CSV file to database on Google app engine using Python

python,database,google-app-engine,csv,upload

You can upload your files into blobstore, using blobstore api Once you upload your file in blobstore, you get blobkey, then you can use blobreader, to read csv file content and store them according in your database. Hope it helps....

GAE/P: Migrating to NDB efficiently

python,google-app-engine,app-engine-ndb

In your case the In-Context Cache will take over and save you the db calls: The in-context cache is fast; this cache lives in memory. When an NDB function writes to the Datastore, it also writes to the in-context cache. When an NDB function reads an entity, it checks the...

Getting gcloud to work in Cygwin Windows

python,windows,google-app-engine,cygwin

First: Cygwin 32? Do you have a 32bit machine? Otherwise the 64bit Version will be the better choice! Please have a look here, if you DIDN'T install python via cygwin: Using python on windows If you DID install it via cygwin: Set up python on windows You might also have...

Objectify - should I create an entity super class?

java,google-app-engine,objectify

It can be helpful to have a common base class, but you almost certainly do not want to make it part of a polymorphic entity hierarchy. Don't use @Subclass for this purpose; you don't need it: public class ModelEntity { @Id Long id; } @Entity public class User extends ModelEntity...

IllegalArgumentException: expected primitive class, but got: class UUID

android,google-app-engine,google-cloud-endpoints

I do understand why Google Api JSON parser was attempting to parse UUID as primitive, but at least I found a workaround to this issue. In my model class I kept field as UUID but changed getter to return String, now it looks like this: public String getId() { return...

GAE python - client_secrets.json 'File not found' - app.yaml error?

python,json,google-app-engine,youtube-api,app.yaml

I was able to find an example online that I got to work, so I used those app.yaml settings in my project, which then worked. It would be nice for Google to post more complete examples, instead of clips from only the .py script. application: [your app name] version: 1...

Could someone bring Google OAuth2 for Cloud DNS via Rest to light?

c#,api,rest,google-app-engine,dns

found some time to create a small sample application. You can find the code on github . You said you don't want to use the client_secrets.json. The only quick solution i found was to provide the necessary stuff via memory stream - there may be better ways. Most of the...