Skip to content

Commit

Permalink
user can deploy without appid
Browse files Browse the repository at this point in the history
  • Loading branch information
xxnet committed Jan 9, 2016
1 parent b03e096 commit 407d8de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion gae_proxy/local/direct_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
xlog = getLogger("gae_proxy")


google_server_types = ["GAE", "Google Frontend", "GSE"]


def send_header(wfile, keyword, value):
keyword = keyword.title()
Expand Down Expand Up @@ -96,7 +98,8 @@ def handler(method, host, url, headers, body, wfile):
if response:
if response.status > 400:
server_type = response.getheader('Server', "")
if "gws" not in server_type and "Google Frontend" not in server_type and "GFE" not in server_type:

if "gws" not in server_type and server_type not in google_server_types:
xlog.warn("IP:%s not support GAE, server type:%s status:%d", response.ssl_sock.ip, server_type, response.status)
google_ip.report_connect_fail(response.ssl_sock.ip, force_remove=True)
response.close()
Expand Down
4 changes: 2 additions & 2 deletions gae_proxy/local/proxy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ scholar.google.com.hk = direct
;mail.google.com = direct
.commondatastorage.googleapis.com = gae
chart.apis.google.com = gae
appengine.google.com = gae
appengine.google.com = direct
;mail-attachment.googleusercontent.com = direct
;.googleusercontent.com = direct
;themes.googleusercontent.com = direct
talk.google.com = direct
talk.l.google.com = direct
talkx.l.google.com = direct
;.google.com = direct
www.google.com = gae
www.google.com = direct
translate.google.com = gae
;.gmail.com = direct
;.ytimg.com = direct
Expand Down
2 changes: 1 addition & 1 deletion gae_proxy/server/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def upload(appid, email, password):
fp.write(re.sub(r'application:\s*\S+', 'application: '+appid, yaml))

try:
for i in range(100):
for i in range(3):
try:
result = appcfg.AppCfgApp(['appcfg', 'rollback', dirname], password_input_fn=getpass_getpass, raw_input_fn = my_input, error_fh = my_stdout).Run()
if result != 0:
Expand Down

0 comments on commit 407d8de

Please sign in to comment.