本文整理汇总了Python中appscale.tools.appscale_tools.AppScaleTools.update_queues方法的典型用法代码示例。如果您正苦于以下问题:Python AppScaleTools.update_queues方法的具体用法?Python AppScaleTools.update_queues怎么用?Python AppScaleTools.update_queues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类appscale.tools.appscale_tools.AppScaleTools
的用法示例。
在下文中一共展示了AppScaleTools.update_queues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: deploy
# 需要导入模块: from appscale.tools.appscale_tools import AppScaleTools [as 别名]
# 或者: from appscale.tools.appscale_tools.AppScaleTools import update_queues [as 别名]
def deploy(self, app, project_id=None):
""" 'deploy' is a more accessible way to tell an AppScale deployment to run a
Google App Engine application than 'appscale-upload-app'. It calls that
command with the configuration options found in the AppScalefile in the
current working directory.
Args:
app: The path (absolute or relative) to the Google App Engine application
that should be uploaded.
project_id: Which project ID to use to deploy the application.
Returns:
A tuple containing the host and port where the application is serving
traffic from.
Raises:
AppScalefileException: If there is no AppScalefile in the current working
directory.
"""
contents = self.read_appscalefile()
# Construct an upload-app command from the file's contents
command = []
contents_as_yaml = yaml.safe_load(contents)
if 'keyname' in contents_as_yaml:
command.append("--keyname")
command.append(contents_as_yaml['keyname'])
if 'test' in contents_as_yaml and contents_as_yaml['test'] == True:
command.append("--test")
if 'verbose' in contents_as_yaml and contents_as_yaml['verbose'] == True:
command.append("--verbose")
command.append("--file")
command.append(app)
if project_id is not None:
command.append("--project")
command.append(project_id)
# Finally, exec the command. Don't worry about validating it -
# appscale-upload-app will do that for us.
options = ParseArgs(command, "appscale-upload-app").args
login_host, http_port = AppScaleTools.upload_app(options)
AppScaleTools.update_cron(options.file, options.keyname)
AppScaleTools.update_queues(options.file, options.keyname)
return login_host, http_port