I am deploying an application on Google App Engine. In the admin logs, I see that it deploys successfully, "Completed update of a new default version". But I never see the "API configuration update serving" message after this.
When I go to API explorer, there is nothing under services.
Note: When I added the same @endpoints.method to another Application, the API is showing when I deploy this app. So, I am assuming it is something silly. My code and output of the deploy is below. I would appreciate any pointers!
Output of deploy
** Running appcfg.py with the following flags: --oauth2_credential_file=~/.appcfg_oauth2_tokens update 12:06 AM Application: apns-push; version: 1 12:06 AM Host: appengine.google.com 12:06 AM Starting update of app: apns-push, version: 1 12:06 AM Getting current resource limits. 12:06 AM Scanning files on local disk. 12:06 AM Cloning 1 static file. 12:06 AM Cloning 3 application files. 12:06 AM Compilation starting. 12:06 AM Compilation completed. 12:06 AM Starting deployment. 12:06 AM Checking if deployment succeeded. 12:06 AM Deployment successful. 12:06 AM Checking if updated app version is serving. 12:06 AM Completed update of app: apns-push, version: 1 12:06 AM Uploading index definitions. If deploy fails you might need to 'rollback' manually. The "Make Symlinks..." menu option can help with command-line work. ** appcfg.py has finished with exit code 0 **
Code
@endpoints.api( name='apns_server',
version='v1',
allowed_client_ids=[WEB_CLIENT_ID,API_EXPLORER_CLIENT_ID],
scopes=[EMAIL_SCOPE])
class APNSPush(remote.Service):
"""Conference API v0.1"""
# - - - Profile objects - - - - - - - - - - - - - - - - - - - @endpoints.method(RegisterForm, BooleanMessage,
path='registerDevice', http_method='POST', name='registerDevice')
def registerDevice(self, request):
"""Update & return user profile."""
ret_val=True
prof = Profile()
buf = 'received device Token'
logging.debug(buf)
for field in ('userID', 'deviceUUID','deviceToken'):
if hasattr(request, field):
val = getattr(request, field)
if val:
setattr(prof, field, str(val))
buf = '%s %s' % (field,val)
logging.debug(buf)
else:
buf = 'Could not get value for field %s' % (field)
logging.debug(buf)
ret_val=False
else:
buf = '%s not present' % (field)
logging.debug(buf)
ret_val=False
prof.put()
return BooleanMessage(data=ret_val)
api = endpoints.api_server([APNSPush])