예제 #1
0
def restart_app_instances_for_app(app_name):
  """ Restarts all instances of a Google App Engine application on this machine.

  Args:
    app_name: The application ID corresponding to the app to restart.

  Returns:
    True if successful, and False otherwise.
  """
  if not misc.is_app_name_valid(app_name):
    logging.error("Unable to kill app process %s on because of " +\
                  "invalid name for application"%(app_name))
    return False

  logging.info("Restarting application %s"%app_name)
  watch = "app___" + app_name
  return monit_interface.restart(watch)
예제 #2
0
def restart_app_instances_for_app(app_name):
    """ Restarts all instances of a Google App Engine application on this machine.

  Args:
    app_name: The application ID corresponding to the app to restart.

  Returns:
    True if successful, and False otherwise.
  """
    if not misc.is_app_name_valid(app_name):
        logging.error("Unable to kill app process %s on because of " +\
                      "invalid name for application"%(app_name))
        return False

    logging.info("Restarting application %s" % app_name)
    watch = "app___" + app_name
    return monit_interface.restart(watch)
예제 #3
0
def restart_app_instances_for_app(app_name, language):
    """ Restarts all instances of a Google App Engine application on this machine.

  Args:
    app_name: The application ID corresponding to the app to restart.
    language: The language the application is written in.
  Returns:
    True if successful, and False otherwise.
  """
    if not misc.is_app_name_valid(app_name):
        logging.error("Unable to kill app process %s on because of " "invalid name for application" % (app_name))
        return False
    if language == "java":
        remove_conflicting_jars(app_name)
        copy_modified_jars(app_name)
    logging.info("Restarting application %s" % app_name)
    watch = "app___" + app_name
    return monit_interface.restart(watch)
예제 #4
0
def restart_app_instances_for_app(app_name, language):
    """ Restarts all instances of a Google App Engine application on this machine.

  Args:
    app_name: The application ID corresponding to the app to restart.
    language: The language the application is written in.
  Returns:
    True if successful, and False otherwise.
  """
    if not misc.is_app_name_valid(app_name):
        logging.error("Unable to kill app process %s on because of " +\
                      "invalid name for application"%(app_name))
        return False
    if language == "java":
        remove_conflicting_jars(app_name)
        copy_modified_jars(app_name)
    logging.info("Restarting application %s" % app_name)
    watch = "app___" + app_name
    return monit_interface.restart(watch)