Twisted integration: shutdown event vs. manual stop
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
New
|
Undecided
|
Unassigned |
Bug Description
When shutting down my twistd server, using storm-twisted with MySQL, I get:
File "/home/
self.
exceptions.
This is because one of my services manually calls StorePool.stop(), and at the same time, each DeferredStore itself registers a reactor shutdown event. As a result, the store.rollback() call in DeferredStore.
I'm not sure what the best way to go about this would be. Checking again for self.thread.stopped before actually calling rollback() seems to do the job. Or maybe the shutdown event should just be optional.