----- Oryginalna wiadomość -----
> Od: "Roberto De Ioris" <[email protected]>
> Do: "uWSGI developers and users list" <[email protected]>
> Wysłane: niedziela, 5 luty 2012 19:18:57
> Temat: Re: [uWSGI] max 64 file monitors
> 
> You can increase the number at compile time (in uwsgi.h and signal.c)
> but
> for this specific kind of usage (where copy on write could not be
> used,
> and monitors can change all over the place) you should change the
> architecture:
> 
> Use a mule with only a cycle using pyinotify (or whatever facility
> you
> want to use). Whenever a file modification happens the mule raises a
> uwsgi
> signal (waking up workers):
> 
> notifier = Notifier(..., MyEvent)
> 
> while True:
>     # wait for events
>     notifier.process_events()
>     # read events
>     if notifier.check_events():
>         notifier.read_events()
> 
> in the MyEvent class you simply define methods for each event, in
> which
> you can simply do uwsgi.signal(N)
> 
> Save the script in a .py file and attach to a mule with
> 


Perhaps, it is useful and saves someone a few minutes of work.
You can add as an example of using Mule.

http://pastebin.com/WWZYet1c

It works perfectly well on Pyhon 3.2


-- 
Łukasz Wróblewski
http://www.nri.pl/ - Nowoczesne Rozwiązania Internetowe
http://www.hostowisko.pl/ - Profesjonalny i tani hosting
http://www.katalog-polskich-firm.pl/ - Najlepszy darmowy katalog firm
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to