Commit a07f8af3 authored by Jim Fulton's avatar Jim Fulton

Immediately(ish) remove temporary config files created for ad hoc servers

They're annoying. :)
parent 9613f09b
...@@ -180,12 +180,10 @@ Which is a short-hand for:: ...@@ -180,12 +180,10 @@ Which is a short-hand for::
connection = db.open() connection = db.open()
If you exit the Python process, the storage exits as well, as it's run If you exit the Python process, the storage exits as well, as it's run
in an in-process thread. It will leave behind it's configuration and in an in-process thread.
log file. This provides a handy way to get a configuration example.
You shut down the server more cleanly by calling the stop function You shut down the server more cleanly by calling the stop function
returned by the ``ZEO.server`` function. This will remove the returned by the ``ZEO.server`` function.
temporary configuration file.
To have data stored persistently, you can specify a file-storage path To have data stored persistently, you can specify a file-storage path
name using a ``path`` parameter. If you want blob support, you can name using a ``path`` parameter. If you want blob support, you can
......
...@@ -139,6 +139,7 @@ def runner(config, qin, qout, timeout=None, ...@@ -139,6 +139,7 @@ def runner(config, qin, qout, timeout=None,
) )
thread.setDaemon(True) thread.setDaemon(True)
thread.start() thread.start()
os.remove(config)
try: try:
qin.get(timeout=timeout) # wait for shutdown qin.get(timeout=timeout) # wait for shutdown
...@@ -181,7 +182,6 @@ def stop_runner(thread, config, qin, qout, stop_timeout=9, pid=None): ...@@ -181,7 +182,6 @@ def stop_runner(thread, config, qin, qout, stop_timeout=9, pid=None):
gc.collect() gc.collect()
thread.join(stop_timeout) thread.join(stop_timeout)
os.remove(config)
def start_zeo_server(storage_conf=None, zeo_conf=None, port=None, keep=False, def start_zeo_server(storage_conf=None, zeo_conf=None, port=None, keep=False,
path='Data.fs', protocol=None, blob_dir=None, path='Data.fs', protocol=None, blob_dir=None,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment