From d89de123f16b30d7a73e1b72271033fea751eb92 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 3 Sep 2019 10:11:33 +0100 Subject: [PATCH] Occasionally try to restore the queue --- inbox.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/inbox.py b/inbox.py index e71b58aaf..52eebc7c5 100644 --- a/inbox.py +++ b/inbox.py @@ -1183,6 +1183,7 @@ def runInboxQueue(projectVersion: str, \ itemReadFailed=0 heartBeatCtr=0 + queueRestoreCtr=0 while True: time.sleep(1) @@ -1193,7 +1194,13 @@ def runInboxQueue(projectVersion: str, \ print('>>> Heartbeat Q:'+str(len(queue))+' '+datetime.datetime.now().strftime("%m/%d/%Y, %H:%M:%S")) heartBeatCtr=0 - if len(queue)>0: + if len(queue)==0: + # restore any remaining queue items + queueRestoreCtr+=1 + if queueRestoreCtr>=30: + queueRestoreCtr=0 + restoreQueueItems(baseDir,queue) + else: currTime=int(time.time()) # recreate the session periodically