Reimporting products without restarting server
Having a slow machine, not having to restart the server when testing is important for me (it is a 20 second start up for me). Is there a script around to let me do this... ? Here is what I have done so far (using bits of snippet from the source): log into the monitor, and do this: import Zope app = Zope.app c=app() OFS.Application.initialize(c) c._p_jar.close() del c The net result is all items in the the "Add New Item" combobox double up, and I am not even sure if this does the trick...
In Zope, file objects have a 'Precondition' attribute. What is this for?
From: "Damian Morton" <morton@dennisinter.com>
In Zope, file objects have a 'Precondition' attribute. What is this for?
It is the name of a method that will be called when the File is accessed. You can use it for checking a session cookie, or anything you need from the REQUEST. If you then want to deny access to the resource, because your precondition hasn't been met, the method can raise an exception. Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server ---------------------------------------------
Chui Tey wrote:
Having a slow machine, not having to restart the server when testing is important for me (it is a 20 second start up for me). Is there a script around to let me do this... ?
No, sorry. Python has a 'reload()' built-in, maybe that could be explored, I really don't know enough about it.
Here is what I have done so far (using bits of snippet from the source):
log into the monitor, and do this:
import Zope app = Zope.app c=app() OFS.Application.initialize(c)
Aiee! This method was never meant to be called more than once.
c._p_jar.close() del c
The net result is all items in the the "Add New Item" combobox double up, and I am not even sure if this does the trick...
or any other non-visible side effect it may have. I would recommend meditating on the Zen of Zope between restarts. -Michel
On Wed, 08 Mar 2000 19:29:23 -0800, Michel Pelletier <michel@digicool.com> wrote:
Having a slow machine, not having to restart the server when testing is important for me (it is a 20 second start up for me). Is there a script around to let me do this... ?
Are you killing the server between restarts, or closing it politely with the management interface? The polite shutdown writes an index file that speeds up the restart. My development database has 30k objects, and restarts in under 3 seconds. Toby Dickenson tdickenson@geminidataloggers.com
participants (5)
-
Chui Tey -
Martijn Pieters -
Michel Pelletier -
morton@dennisinter.com -
Toby Dickenson