Il giorno 22/nov/2012, alle ore 12:24, est <[email protected]> ha scritto:
> > What might you need this for? > > I use the uwsgi as some kind of k-v store. And it's very simple counters with > keys like > > TASK:SPOOLER:COUNTER:1 > TASK:SPOOLER:COUNTER:2 > TASK:SPOOLER:COUNTER:3 > > The counter was set by each spooler so the last number is the pid > > > Why do you need to know which spooling workers are active? > > I wrote a django view to gather the long running spooler stats to the > browser, which need to enumerate every spooler. > > So back to my questions, I guess I need register a global spooler pid list > somewhere? > > But the get-modify-set way for a global spooler pid list is not atomic. > The only way to have a "safe" view of the spoolers pid is using the stats subsystem. You add --stats :port and when you connect to that port you receive a json with all of the statistics. In that json the "spoolers" list has all of the infos you need. -- Roberto De Ioris http://unbit.it JID: [email protected] _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
