>   Hi Roberto,
>
> On 20.04.2011 13:09, Roberto De Ioris wrote:
>> Hi all, as someone already noted uWSGI 0.9.8 development cycle has beed
>> started.
>>
>> This will be the next LTS release so do not expect extremely big
>> changes.
>>
>> Currently we are focusing on fixing the various long-time quirks (as the
>> wsgi.input/rack.input total mess) and in allowing uWSGI to natively
>> speaks other protocols (http, fastcgi and mongrel2/zeromq are already
>> available in the tip).
>>
>> So, if you want to propose some new feature do it ASAP :)
>
>   I'd like to ask once again for several improvements in Emperor mode:
>     1. passing some options to instances with possibility of templating
> in option value



Check the latest tip:

--inherit <filename>

(you can specify it multiple times)

it will "merge" another config file. This "template" can inherit itself
from another one and so on (beware of circular loops). You can use
variables in it and obviously placeholder.

for example template1.ini

[uwsgi]
my_socket_dir = /tmp
master = true

and config.ini

[uwsgi]
inherit = template1.ini
processes = 4
socket = %(my_socket_dir)/foo.sock


Emperor has --vassals-inherit. It works in the same way but the templates
will be applied to all the vassals.

This should cover all of your needs without adding a tons of options :)


>     2. hooks for phases of starting/stopping instances (namely:
> pre-start, post-start, pre-stop, post-stop).


need to check a couple of things, but they can map to normal executables
files (script or binary it does not matter). Those scripts/executables
will receive the config filename as the first argument.
The problem is that it would be better that they receive all the options
already parsed in some way to make scripting easier...(i am thinking about
a post-stop hook that will do some magic with pidfile, but to know its
filename it should parse the config file and it will be a PITA).
Probably a uwsgi --get <file>:<key> that parse the <file> and returns the
value for <key> would be very useful and less complex to develop:

#!/bin/bash

PIDFILE=`uwsgi --get $1:pidfile`
echo "The pidfile is $PIDFILE"

>
>
>   Autoloading of programming language bridge plugins: python, lua, psgi,
> etc. (without explicit listing in '--plugins' option) is the another
> feature that I'd like to see in uWSGI.
>

still have not found a good way, the only hack that come to my mind is
loading/unloading all of the plugins in the UWSGI_PLUGIN_DIR until the
option is found. The problem is that dlclose() implementation is not very
clear on how resources loaded with dlopen() will be freed :(

-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to