Python 2.7,尝试使用shutil.rmtree()删除大文件夹会产生超时。 如何设置超时或让操作运行直到完成?
File "/var/www/fat/fatsite/analysis_retention/analysis_retention_handler.py", line 29, in delete_old_analysis
shutil.rmtree(analysis_to_delete.output_path)
File "/usr/lib/python2.7/shutil.py", line 250, in rmtree
os.remove(fullname)
File "/home/fat/envs/py2.7/lib/python2.7/site-packages/rq/timeouts.py", line 51, in handle_death_penalty
'value ({0} seconds)'.format(self._timeout))
JobTimeoutException: Job exceeded maximum timeout value (180 seconds)
谢谢