AttributeError: 'module' object has no attribute 'run_controller' #18
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Author: @yang Posted at: 22.09.2010 20:02
Author: @rtyler Posted at: 25.09.2010 18:07
To be honest I don't use, nor have I ever used paster with Spawning or anything else. Is there any chance you could jump into the paste_factory module and come up with a patch? :-/
Author: @yang Posted at: 26.09.2010 06:53
Ah. I'm misunderstanding this part:
"Spawning can be used to launch a wsgi application from the command line using the "spawn" script, or using Python Paste. To use with paste, specify use = egg:Spawning in the [server:main] section of a paste ini file."
What then does it mean to "use with paste"? (If I just invoke spawning directly, I don't need to adjust the paste ini.)
This isn't a big deal as I'm just invoking spawning directly now, but consider updating/clarifying the docs?
Author: @rdw Posted at: 01.10.2010 21:59
I think it just means that spawning understands Paste Deploy's .ini files. Here's how you launch Spawning with them:
spawning --factory=spawning.paste_factory.config_factory development.ini
Author: @yang Posted at: 01.10.2010 22:01
Yes, that's what I do and that's what I meant with "just invoke spawning directly." Another way to spin this question: what is "use = egg:Spawning" for?
Author: @rdw Posted at: 01.10.2010 22:12
Man I have no idea. I bet that's something that was working at one point but got broken. I'd suggest removing it from the README until we figure out how Paste works. I've looked at its documentation a bunch of times and I still have no idea what the deuce paste factories are for.
Author: @countergram Posted at: 11.11.2010 21:54
Since I use Pylons I tried to fix this so
use = egg:Spawning
would work. It appears to be impossible without changing much more of spawning, and should be removed from the doc in favor of saying that spawning is meant to be used only as a command-line script.Because os.execve() is called to replace child processes with new processes just after os.fork(), the child processes can receive only strings from the parent. In the example above of launching from the command line, each child parses the .ini file separately on startup. In other prefork and/or threaded wsgi servers I've used (e.g. flup), the parent parses the config file once, and the wsgi application is available as an object to children (because only fork() is used).
The reason I think
use = egg:Spawning
can't work is that Paste Deploy is based on the idea of your config file referencing an entry point/function that creates and returns a wsgi application. This wsgi application is not in module global scope (it was created inside a function) and therefore cannot be pickled or referred to by a string name.Author: @sayap Posted at: 12.08.2012 00:31
With the following diff, I can get
paster serve
to work fine with Spawning. The first 2 hunks add support for--app-name
and--server-name
, while the last 2 hunks unbreak support foruse = egg:Spawning
. I got lazy with arguments parsing, so I just pull in PasteScript as another dependency on top of PasteDeploy.Note that I have only done minimal testing with this...