On Sun, Jan 29, 2012 at 12:56 AM, Roberto De Ioris <[email protected]> wrote:
>> On Sun, Jan 29, 2012 at 12:24 AM, Roberto De Ioris <[email protected]>
>> wrote:
>>>
>>>> any way to accomplish this?  i need the effect of:
>>>>
>>>> static-map = /media=$(import django;
>>>> django.__path__)/contrib/admin/media/
>>>>
>>>> ... if you think in terms of bash command substitution.  maybe i am i
>>>> approaching this wrong; is there a better solution escaping me? maybe
>>>> a [python]command substitution would be useful ... wasn't there a way
>>>> to dynamically generate a config, or completely configure via python
>>>> ... so many options ...
>>>
>>> What about
>>>
>>> http://projects.unbit.it/uwsgi/wiki/Example#Configviapipe
>>>
>>> Note: this approach is not-good after reloading (as the pipe will be
>>> closed after the first round)
>>> A better approach would be --ini exec://myscript.py as already requested
>>> by other users.
>>
>> ahh right, of course ... i can't believe i never tried that, or /dev/stdin
>> :-)
>>
>> `exec://{executable}` would definitely complement the other
>> {scheme}://{target} ... another good one might be
>> `fd://{file-descriptor}`.
>
> fd:// is already available from 0.9 (i mainly use it to read data from
> named pipes/fifo)

er ... i take it uWSGI will die after reloading with `--ini -`, yes
(to clarify your Note:)? what about `--ini fd://0`?  i suppose it will
read until EOF (sigpipe?) then close it, otherwise it would not know
when to stop ... ?  i will play around with this a bit.

... would all fd://N have this concern? lastly, since you said named
pipe, would i need to use `fd://path/to/pipe`?

hypothetically speaking, if exec:// is implemented, i'd probably want
to embed that via data or sym as well ... maybe `sym+exec://` or
`data+exec://`?  i've seen that URL scheme in other places (libvirt
comes to mind), might not make sense in some cases though.

-- 

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

Reply via email to