Persistent Pyro
Mayavimmer <[email protected]> Mon, 07 Jul 2014 19:31:44 +0200
| Newsgroups | gmane.comp.python.pyro |
|---|---|
| Message-ID | <[email protected]> |
I am trying to persist a Pyro4 object. I modified the Warehouse example
to try to store to a Shelve store. My strategy is to duplicate the
Warehouse instance when it comes time to save it, creating a non
Pyroized copy which can the be saved. Here are the steps:
1. Created a Warehouse.dup() with:
n = Warehouse()
n.contents[:] = self.contents
return n
2. def save: # calls dup() and stores its non-Pyroized true Warehouse
instance into the Shelve object.
3. def store: # if name == 'quit', save etc.
Problem: I now get: ConnectionClosedError: receiving: not enough data
The server undoubtedly attempted to close the connection while the
client held a live instance of Warehouse.
How do I shut down cleanly?
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft