forked from indymedia/epicyon
Avoid condition if already true
parent
68c3e03279
commit
b023cda55d
11
threads.py
11
threads.py
|
@ -88,11 +88,12 @@ def removeDormantThreads(baseDir: str,threadsList: [],debug: bool) -> None:
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: thread is not alive')
|
print('DEBUG: thread is not alive')
|
||||||
removeThread=True
|
removeThread=True
|
||||||
# timeout for started threads
|
else:
|
||||||
if (currTime-th.startTime).total_seconds()>120:
|
# timeout for started threads
|
||||||
if debug:
|
if (currTime-th.startTime).total_seconds()>120:
|
||||||
print('DEBUG: started thread timed out')
|
if debug:
|
||||||
removeThread=True
|
print('DEBUG: started thread timed out')
|
||||||
|
removeThread=True
|
||||||
else:
|
else:
|
||||||
# timeout for threads which havn't been started
|
# timeout for threads which havn't been started
|
||||||
if (currTime-th.startTime).total_seconds()>60*10:
|
if (currTime-th.startTime).total_seconds()>60*10:
|
||||||
|
|
Loading…
Reference in New Issue