Added example of how to handle event errors gracefully without them taking down the server with with unhandled exceptions (this should be handled somewhere above exception too, but it's hard to tell when to do it since twisted is raising them). /Starkiel

This commit is contained in:
Griatch 2009-04-30 08:23:54 +00:00
parent b53c228257
commit 8799a0fd55
5 changed files with 20 additions and 7 deletions

View file

@ -24,8 +24,6 @@ def add_event(event):
#don't add multiple instances of the same event
if event in schedule:
return
#i = schedule.index(event)
#schedule[i] = event
else:
schedule.append(event)
event.start_event_loop()