forked from indymedia/epicyon
Exception handling in threaded post
parent
cb0f95c62b
commit
85415f579f
13
posts.py
13
posts.py
|
@ -1007,10 +1007,15 @@ def threadSendPost(session,postJsonStr: str,federationList: [],\
|
||||||
tries=0
|
tries=0
|
||||||
backoffTime=60
|
backoffTime=60
|
||||||
for attempt in range(20):
|
for attempt in range(20):
|
||||||
postResult = \
|
postResult=None
|
||||||
postJsonString(session,postJsonStr,federationList, \
|
try:
|
||||||
inboxUrl,signatureHeaderJson, \
|
postResult = \
|
||||||
"inbox:write",debug)
|
postJsonString(session,postJsonStr,federationList, \
|
||||||
|
inboxUrl,signatureHeaderJson, \
|
||||||
|
"inbox:write",debug)
|
||||||
|
except Exception as e:
|
||||||
|
print('ERROR: postJsonString failed')
|
||||||
|
print(e)
|
||||||
if postResult:
|
if postResult:
|
||||||
logStr='Success on try '+str(tries)+': '+postJsonStr
|
logStr='Success on try '+str(tries)+': '+postJsonStr
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue