To best plugin for starting is plugins/emperor_pg (the postgresql one).

Basically you "register" an "imperial monitor" and it will be triggered at
the right moment.

In this case, the emperor doesn't know the right moment. My plugin will be notified via a socket when it needs to do something. So I don't want to add/stop/respawn the vassals when the emperor loops through my plugin.

I only need to add vassals on startup. How do I do that? A flag in _init, and then clear the flag in the monitor func?

Only the emperor process has access to the "ui" pointer, while the init()
hook is called on startup (before it is available as you have already
noted)

That simple change seemd to work still

--
дамјан
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to