Hello Roberto,
thank you for the link, it helped!

The problem was that I had '%n' in my template.conf, so it was resolved as
'template' for all the ini files.
E.g: socket=/tmp/uwsgi/sockets/%n.sock

I solved saving %n in a placeholder in the real ini, before the inclusion
of the template, and then using the placeholder in the template.
Like this:

------------------ real.ini ---------------------------------
[uwsgi]
proj_name = %n
ini = /var/www-py/ini_templates/template.conf
[...]
--------------------------------------------------------------

------------------ template.conf ---------------------
[uwsgi]
socket=/tmp/uwsgi/sockets/%(proj_name).sock
[...]
--------------------------------------------------------------

Thank you very much

*Alberto Scotto*

skype:dasgazzo
http://about.me/alb_i986


2013/2/24 Roberto De Ioris <[email protected]>

>
> > Hi all,
> >
> > I have recently come across this awesome product in order to deploy
> Django
> > projects.
> > First of all, my congrats to Roberto and fellows, great work!
> >
> > With a few efforts, I have achieved a nice setup with emperor,
> fastrouter,
> > subscription server, threads, cheapness, stats.
> >
> > Then I watched the video on YT where Roberto talked about Going massive,
> > and I found out the templating feature. I am keen on cleanness and
> DRYness
> > so I gave it a try, but did not succeed.
> >
> > My question is whether templating and emperor mode can coexist.
> > According to my test it is not so, but I haven't gone through the issue
> > much yet, so I may have made a stupid mistake.
> > However it looks like the emperor spawns the template (filename:
> > "template.conf") as a vassal as soon as it reaches the ini directive that
> > includes it in my real ini file, even though its file name doesn't end
> > with
> > ".ini", so the emperor should skip it.
> >
> >
>
> Hi, you may want to read this:
>
> http://projects.unbit.it/uwsgi/wiki/ParsingOrder
>
> Basically is your vassal's file that will include the template.
>
> .conf is not an extension recognized by the emperor (even if you could
> made a plugin for adding that) so it will never start it as a vassal, so
> maybe you have made some mistake.
>
> Generally i suggest to put templates out of the emperor monitored
> directories to avoid accidental spawn.
>
>
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to