Exemplo n.º 1
0
 def _get_or_create_s3_key(s3_location):
     """Get or create a Boto reference to an s3 key of the s3_location."""
     bucket_name, path = s3_utils.parse_s3_location(s3_location)
     bucket = s3_utils.get_s3_bucket(bucket_name)
     key = bucket.get_key(path)
     if not key:
         key = bucket.new_key(path)
     return key
Exemplo n.º 2
0
 def _get_or_create_s3_key(s3_location):
     """Get or create a Boto reference to an s3 key of the s3_location."""
     bucket_name, path = s3_utils.parse_s3_location(s3_location)
     bucket = s3_utils.get_s3_bucket(bucket_name)
     key = bucket.get_key(path)
     if not key:
         key = bucket.new_key(path)
     return key
Exemplo n.º 3
0
 def __init__(self, file_path):
     super(S3FileLogSaver, self).__init__(file_path)
     bucket_name, rest_file_path = s3_utils.parse_s3_location(self._file_path)
     local_file_path = \
         os.path.join(PinballConfig.LOCAL_LOGS_DIR,
                      rest_file_path.replace(PinballConfig.JOB_LOG_PATH_PREFIX, ''))
     self._local_file_log_saver = FileLogSaver(local_file_path)
     self._last_remote_upload_time = time.time()
     self._pending_bytes = 0L
     self._s3_key = None
Exemplo n.º 4
0
 def __init__(self, file_path):
     super(S3FileLogSaver, self).__init__(file_path)
     bucket_name, rest_file_path = s3_utils.parse_s3_location(
         self._file_path)
     local_file_path = \
         os.path.join(PinballConfig.LOCAL_LOGS_DIR,
                      rest_file_path.replace(PinballConfig.JOB_LOG_PATH_PREFIX, ''))
     self._local_file_log_saver = FileLogSaver(local_file_path)
     self._last_remote_upload_time = time.time()
     self._pending_bytes = 0L
     self._s3_key = None