Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to GAE Backend #41

Closed
robertowm opened this issue Feb 25, 2012 · 4 comments
Closed

Support to GAE Backend #41

robertowm opened this issue Feb 25, 2012 · 4 comments

Comments

@robertowm
Copy link

I use backend instances in my project and it is a very cool feature to improve this module. I've already implemented this, changing 'commands.py'. The solution is below.

File: commands.py

Changes:

  1. Put the commands in the array COMMANDS, line 18:
    COMMANDS = ["gae:deploy", "gae:package", "gae:update_indexes", "gae:vacuum_indexes", "gae:update_queues", "gae:update_dos", "gae:update_cron", "gae:cron_info", "gae:update_backend", "gae:backend_info", "gae:request_logs"]

  2. Put the explanations of the new commands in the array HELP, line 19:
    HELP = {
    'gae:deploy': "Deploy to Google App Engine",
    'gae:update_indexes': "Updating Indexes",
    'gae:vacuum_indexes': "Deleting Unused Indexes",
    'gae:update_queues': "Managing Task Queues",
    'gae:update_dos': "Managing DoS Protection",
    'gae:update_cron': "Managing Scheduled Tasks : upload cron job specifications",
    'gae:cron_info': "Managing Scheduled Tasks : verify your cron configuration",
    'gae:update_backend': "Managing Backend Instances : update your backend configuration",
    'gae:backend_info': "Managing Backend Instances : verify your backend configuration",
    'gae:request_logs': "Download logs from Google App Engine",
    }

  3. Insert the following code in the end of the file (inside 'def execute(**kargs)'):
    if command == "gae:update_backend":
    print ''
    print '
    Updating backend specifications'
    print '~ ---------'

    if os.name == 'nt':
            os.system('%s/bin/appcfg.cmd backends update %s' % (gae_path, war_path))
    else:
            os.system('%s/bin/appcfg.sh backends update %s' % (gae_path, war_path))
    print "~ "
    print "~ Done!"
    print "~ "
    sys.exit(-1)
if command == "gae:backend_info":
    print '~'
    print '~ Listing backend specifications'
    print '~ ---------'
    if os.name == 'nt':
            os.system('%s/bin/appcfg.cmd backends list %s' % (gae_path, war_path))
    else:
            os.system('%s/bin/appcfg.sh backends list %s' % (gae_path, war_path))
    print "~ "
    print "~ Done!"
    print "~ "
    sys.exit(-1)
@mandubian
Copy link
Collaborator

Seems quite good...
Could you send a pull request please, it would be easier for me to merge your modifications?

Thanks

@robertowm
Copy link
Author

But I can't. I don't find the option to pull request....
And I forgot two more changes:

  1. Add the following line in the method GAEPlugin.onRoutesLoaded():
    Router.addRoute("GET", "/_ah/start", "GAEActions.startBackend");

  2. Add the following method in the class GAEActions:
    public static void startBackend() {
    ok();
    }

@mandubian
Copy link
Collaborator

http://help.github.com/send-pull-requests/
Tell me if you can't do it following this and I'll the code myself ;)

thanks
Pascal

On Mon, Feb 27, 2012 at 3:39 PM, robertowm <
reply@reply.github.com

wrote:

But I can't. I don't find the option to pull request....
And I forgot two more changes:

  1. Add the following line in the method GAEPlugin.onRoutesLoaded():
    Router.addRoute("GET", "/_ah/start", "GAEActions.startBackend");

  2. Add the following method in the class GAEActions:
    public static void startBackend() {
    ok();
    }


Reply to this email directly or view it on GitHub:
#41 (comment)

@mandubian
Copy link
Collaborator

Just committed your modifs

mandubian pushed a commit that referenced this issue Mar 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants