The module was loaded because it works for a couple calls made by the loop, but not all the consecutive calls
# 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 On May 9, 2013, at 6:44 AM, Roberto De Ioris <[email protected]> wrote: > >> Hi >> >> I'm using uWSGI 1.4.9 and Python 2.7.2, (64bit) for Mac, 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: >> >> # 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 >> > > Can you post your config ? > > The error generally means you have not loaded the module with @mulefunc on > startup (read: in the master) > > -- > Roberto De Ioris > http://unbit.it > _______________________________________________ > 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
