假设存在一个task.py,由于长时间工作内存溢出的问题,可能终止。如何检测他停止任务,立即重启他?
task.py
import time
while(1):
print('.')
# 模拟异常终止
sleep(2)
exit(0)
感谢!!!!!
米琪卡哇伊
慕神8447489
www说