> 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. On Thu, Nov 22, 2012 at 7:11 PM, Aarni Koskela <[email protected]>wrote: > 1) Unfortunately it doesn’t seem like there's an API call for that, not > even in uWSGI core's cache.c. What might you need this for? > 2) I would assign the job ID while giving the task to the spooler, instead > of using a pid that might be reused. uuid.uuid4() would probably be a good > match for ID generation in Python. Why do you need to know which spooling > workers are active? > > From: [email protected] [mailto:[email protected]] > On Behalf Of est > Sent: Thursday, November 22, 2012 11:28 AM > To: uWSGI developers and users list > Subject: [uWSGI] enumerate cache keys and spooler pids > > Hi all, > > How do I > > 1. enumerate all cache keys, like the redis KEYS() command? > 2. I am running some background spooler for processing work, using the pid > as the id for each task, now I want to collect all spoolers I started, so > how do I getall worker pids? Using posix process group id? > > > TIA > > _______________________________________________ > 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
