Skip to content

Commit b6011b5

Browse files
Fix #1325 by handling the exception
1 parent 134f952 commit b6011b5

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

sarracenia/flowcb/post/message.py

+13-8
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,21 @@ def __init__(self, options):
3333
self.poster = sarracenia.moth.Moth.pubFactory(props)
3434

3535
def post(self, worklist):
36-
37-
still_ok = []
36+
old_ok = worklist.ok
37+
worklist.ok = []
3838
all_good=True
39-
for m in worklist.ok:
40-
if all_good and hasattr(self.poster,'putNewMessage') and self.poster.putNewMessage(m):
41-
still_ok.append(m)
42-
else:
43-
all_good=False
39+
for m in old_ok:
40+
try:
41+
if all_good and hasattr(self.poster,'putNewMessage') and self.poster.putNewMessage(m):
42+
worklist.ok.append(m)
43+
else:
44+
all_good=False
45+
worklist.failed.append(m)
46+
except Exception as e:
47+
all_good = False
4448
worklist.failed.append(m)
45-
worklist.ok = still_ok
49+
logger.error(f"failed: {e}")
50+
logger.debug("Exception details:", exc_info=True)
4651

4752
def metricsReport(self) -> dict:
4853
if hasattr(self,'poster') and self.poster:

0 commit comments

Comments
 (0)