mirror of https://gitlab.com/bashrc2/epicyon
Sleep first
parent
07f5de5648
commit
62dde14bee
2
inbox.py
2
inbox.py
|
@ -159,6 +159,7 @@ def runInboxQueue(baseDir: str,httpPrefix: str,sendThreads: [],postLog: [],cache
|
||||||
print('DEBUG: Inbox queue running')
|
print('DEBUG: Inbox queue running')
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
time.sleep(1)
|
||||||
if len(queue)>0:
|
if len(queue)>0:
|
||||||
currSessionTime=int(time.time())
|
currSessionTime=int(time.time())
|
||||||
if currSessionTime-sessionLastUpdate>1200:
|
if currSessionTime-sessionLastUpdate>1200:
|
||||||
|
@ -357,4 +358,3 @@ def runInboxQueue(baseDir: str,httpPrefix: str,sendThreads: [],postLog: [],cache
|
||||||
# move to the destination inbox
|
# move to the destination inbox
|
||||||
os.rename(queueFilename,queueJson['destination'])
|
os.rename(queueFilename,queueJson['destination'])
|
||||||
queue.pop(0)
|
queue.pop(0)
|
||||||
time.sleep(2)
|
|
||||||
|
|
2
tests.py
2
tests.py
|
@ -373,7 +373,7 @@ def testFollowBetweenServers():
|
||||||
queuePath=bobDir+'/accounts/bob@'+bobDomain+'/queue'
|
queuePath=bobDir+'/accounts/bob@'+bobDomain+'/queue'
|
||||||
inboxPath=bobDir+'/accounts/bob@'+bobDomain+'/inbox'
|
inboxPath=bobDir+'/accounts/bob@'+bobDomain+'/inbox'
|
||||||
eveMessageArrived=False
|
eveMessageArrived=False
|
||||||
for i in range(20):
|
for i in range(10):
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
if os.path.isdir(inboxPath):
|
if os.path.isdir(inboxPath):
|
||||||
if len([name for name in os.listdir(inboxPath) if os.path.isfile(os.path.join(inboxPath, name))])>1:
|
if len([name for name in os.listdir(inboxPath) if os.path.isfile(os.path.join(inboxPath, name))])>1:
|
||||||
|
|
Loading…
Reference in New Issue