Less indentation

merge-requests/30/head
Bob Mottram 2021-06-05 13:43:57 +01:00
parent 74f2103cc7
commit 1fba7b1b37
3 changed files with 26 additions and 22 deletions

View File

@ -14902,7 +14902,8 @@ def runPostsWatchdog(projectVersion: str, httpd) -> None:
httpd.thrPostsQueue.start()
while True:
time.sleep(20)
if not httpd.thrPostsQueue.is_alive():
if httpd.thrPostsQueue.is_alive():
continue
httpd.thrPostsQueue.kill()
httpd.thrPostsQueue = postsQueueOriginal.clone(runPostsQueue)
httpd.thrPostsQueue.start()
@ -14917,7 +14918,8 @@ def runSharesExpireWatchdog(projectVersion: str, httpd) -> None:
httpd.thrSharesExpire.start()
while True:
time.sleep(20)
if not httpd.thrSharesExpire.is_alive():
if httpd.thrSharesExpire.is_alive():
continue
httpd.thrSharesExpire.kill()
httpd.thrSharesExpire = sharesExpireOriginal.clone(runSharesExpire)
httpd.thrSharesExpire.start()

View File

@ -750,7 +750,8 @@ def runNewswireWatchdog(projectVersion: str, httpd) -> None:
httpd.thrNewswireDaemon.start()
while True:
time.sleep(50)
if not httpd.thrNewswireDaemon.is_alive():
if httpd.thrNewswireDaemon.is_alive():
continue
httpd.thrNewswireDaemon.kill()
httpd.thrNewswireDaemon = \
newswireOriginal.clone(runNewswireDaemon)

View File

@ -167,7 +167,8 @@ def runPostScheduleWatchdog(projectVersion: str, httpd) -> None:
httpd.thrPostSchedule.start()
while True:
time.sleep(20)
if not httpd.thrPostSchedule.is_alive():
if httpd.thrPostSchedule.is_alive():
continue
httpd.thrPostSchedule.kill()
httpd.thrPostSchedule = \
postScheduleOriginal.clone(runPostSchedule)