Пример #1
0
  def __init__(self, app_id):
    """ Configuration constructor. 

    Args:
      app_id: The application ID.
    """
    self._app_id = app_id
    file_io.mkdir(self.CELERY_CONFIG_DIR)
    file_io.mkdir(self.CELERY_WORKER_DIR)
    self.queues = self.load_queues_from_file()
Пример #2
0
  def __init__(self, app_id, db_access=None):
    """ Configuration constructor. 

    Args:
      app_id: The application ID.
      db_access: A DatastoreProxy object.
    """
    self._app_id = app_id
    file_io.mkdir(self.CELERY_CONFIG_DIR)
    file_io.mkdir(self.CELERY_WORKER_DIR)
    self.db_access = db_access
    self.queues = self.load_queues_from_file()
Пример #3
0
  def __init__(self, broker, app_id):
    """ Configuration constructor. 

    Args:
      broker: The broker to use.
      app_id: Application id.
    """
    self._broker = broker
    self._broker_location = self.__broker_location(broker)
    self._app_id = app_id
    self._queue_info_db = None
    self._queue_info_file = None
    file_io.mkdir(self.CELERY_CONFIG_DIR)
    file_io.mkdir(self.CELERY_WORKER_DIR)
Пример #4
0
  def __init__(self):
    """ DistributedTaskQueue Constructor. """
    file_io.set_logging_format()
    file_io.mkdir(self.LOG_DIR)
    file_io.mkdir(TaskQueueConfig.CELERY_WORKER_DIR)
    file_io.mkdir(TaskQueueConfig.CELERY_CONFIG_DIR)

    setup_env()

    master_db_ip = appscale_info.get_db_master_ip()
    connection_str = master_db_ip + ":" + str(constants.DB_SERVER_PORT)
    ds_distrib = datastore_distributed.DatastoreDistributed(
    constants.DASHBOARD_APP_ID, connection_str, False, False)
    apiproxy_stub_map.apiproxy.RegisterStub('datastore_v3', ds_distrib)
    os.environ['APPLICATION_ID'] = constants.DASHBOARD_APP_ID
Пример #5
0
    def __init__(self):
        """ DistributedTaskQueue Constructor. """
        file_io.set_logging_format()
        file_io.mkdir(self.LOG_DIR)
        file_io.mkdir(TaskQueueConfig.CELERY_WORKER_DIR)
        file_io.mkdir(TaskQueueConfig.CELERY_CONFIG_DIR)

        setup_env()

        # Cache all queue information in memory.
        self.__queue_info_cache = {}

        master_db_ip = appscale_info.get_db_master_ip()
        connection_str = master_db_ip + ":" + str(constants.DB_SERVER_PORT)
        ds_distrib = datastore_distributed.DatastoreDistributed(
            constants.DASHBOARD_APP_ID, connection_str, require_indexes=False)
        apiproxy_stub_map.apiproxy.RegisterStub('datastore_v3', ds_distrib)
        os.environ['APPLICATION_ID'] = constants.DASHBOARD_APP_ID
Пример #6
0
  def __init__(self):
    """ DistributedTaskQueue Constructor. """
    file_io.set_logging_format()
    file_io.mkdir(self.LOG_DIR)
    file_io.mkdir(TaskQueueConfig.CELERY_WORKER_DIR)
    file_io.mkdir(TaskQueueConfig.CELERY_CONFIG_DIR)

    setup_env()
  
    # Cache all queue information in memory.
    self.__queue_info_cache = {}

    master_db_ip = appscale_info.get_db_master_ip()
    connection_str = master_db_ip + ":" + str(constants.DB_SERVER_PORT)
    ds_distrib = datastore_distributed.DatastoreDistributed(
      constants.DASHBOARD_APP_ID, connection_str, require_indexes=False)
    apiproxy_stub_map.apiproxy.RegisterStub('datastore_v3', ds_distrib)
    os.environ['APPLICATION_ID'] = constants.DASHBOARD_APP_ID

    # Flag to see if code needs to be reloaded.
    self.__force_reload = False
Пример #7
0
 def __init__(self):
   """ DistributedTaskQueue Constructor. """
   file_io.set_logging_format()
   file_io.mkdir(self.LOG_DIR)
   file_io.mkdir(TaskQueueConfig.CELERY_WORKER_DIR)
   file_io.mkdir(TaskQueueConfig.CELERY_CONFIG_DIR)
Пример #8
0
 def __init__(self):
     """ DistributedTaskQueue Constructor. """
     file_io.set_logging_format()
     file_io.mkdir(self.LOG_DIR)
     file_io.mkdir(TaskQueueConfig.CELERY_WORKER_DIR)
     file_io.mkdir(TaskQueueConfig.CELERY_CONFIG_DIR)