예제 #1
0
    def __init__(self, *args, **kwargs):

        self._preprocess_success = False
        super(TaskQueueHandler, self).__init__(*args, **kwargs)
        if cloudstorage:
            cloudstorage.set_default_retry_params(
                cloudstorage.RetryParams(
                    min_retries=5,
                    max_retries=10,
                    urlfetch_timeout=parameters._GCS_URLFETCH_TIMEOUT_SEC,
                    save_access_token=True,
                    _user_agent=self._DEFAULT_USER_AGENT))
예제 #2
0
파일: shuffler.py 프로젝트: shnaizerk/gts
    def delete_file_or_list(self, filename_or_list):
        if isinstance(filename_or_list, list):
            for filename in filename_or_list:
                self.delete_file_or_list(filename)
        else:
            filename = filename_or_list
            retry_params = cloudstorage.RetryParams(
                min_retries=self._MIN_RETRIES, max_retries=self._MAX_RETRIES)

            try:
                cloudstorage.delete(filename, retry_params)
            except:
                pass