a guest Oct 23rd, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- file_path_list = [os.path.join(sample.analysis.directory or '', file_name) for file_name in sample.status_files_upload.keys()]
- max_timeout = time() + Sample.TIMEOUT_SEG
- files_ready = lambda files: all([base_handler.exists_dir(file_path) for file_path in files])
- while not files_ready(file_path_list) and time() < max_timeout:
- sleep(60) # espera 1 minuto antes de testar de novo
- if not files_ready(file_path_list):
- celery_logger.info('[!] Sample files not found')
- sample.status = Sample.STATUS_TYPE.ERROR.value
- raise Exception('[!] Sample files not found')
- # SEM ELSE!!
- # ...
RAW Paste Data