Don't reload the paster app when run with pserve

Using gunicorn with paster command line causes the application to
load before gunicorn. In this case, there is no choice but to preload
the application. Document this fact.

Fixes #528.
This commit is contained in:
Randall Leeds 2013-08-06 03:17:00 -07:00
parent 63600aa6b3
commit 90fb09f618
2 changed files with 5 additions and 3 deletions

View File

@ -122,3 +122,8 @@ And then as per usual::
$ cd yourpasteproject
$ paster serve development.ini workers=2
However, in this configuration, Gunicorn does not reload the application when
new workers are started. See the note about preloading_.
.. _preloading: configure.html#preload-app

View File

@ -134,9 +134,6 @@ class PasterServerApplication(PasterBaseApplication):
self.load_config_from_file(default_config)
def load(self):
if hasattr(self, "cfgfname"):
return loadapp(self.cfgurl, relative_to=self.relpath, global_conf=self.gcfg)
return self.app