> Hi
>
> I'm using uWSGI 1.4.9 and Python 2.7.2, for Mac (64bit), and I made a
> several consecutive calls to a function that is using @mulefunc decorator
> to make some asynchronous tasks. My setup is for 3 workers and 1 mule.
>
> Well, it should have execute the function a bunch of times, but it is
> executing just twice, not the amount of times the function was called.
>
> First I thought that I ran out mule queue space (64Kb), but each call is
> only using 114 bytes, so that is not the issue.
>
> Code example:
>
> # config file
>
> [uwsgi]
> master = true
> chdir = %d/../server
> home = %d/../environment
> env = LANG=en_US.UTF-8
> env = LC_ALL=en_US.UTF-8
> env = LC_CTYPE=en_US.UTF-8
> env = DJANGO_SETTINGS_MODULE=production_settings
> module = wsgi_production:application
> socket = 127.0.0.1:3035
> processes = 3
> mule = 1
> uid = 1000
> gid = 1000
> enable-threads = true
> single-interpreter = true
> die-on-term = true
> harakiri = 60
> harakiri-verbose = true
> post-buffering = 8192
> max-requests = 1000
> vacuum = true
> logto = /var/log/uwsgi/server.log
> # Import mule funcs
> import =  foobar.bar
>
> # foo.py
>
> from foobar.bar import bar_work
>
> def async_barr(request):
>    for i in range(0, 10):
>        bar_work(i)
>
>
> # bar.py
>
> from uwsgidecorators import mulefunc
>
> @mulefunc
> def bar_work(wait):
>    print "** Calling mule! %d" % int(wait)
>    time.sleep(int(wait))
>
> In the case it should call bar_work ten times, but it call just twice.
> Adding more mules dint solve the problem.
>
> Thank you.
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>

This is a bug fixed in the github repository:

https://github.com/unbit/uwsgi/commit/31b5cf69266e56a0b742a192f47cd195afd637ca

I am backporting it to 1.4

-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to