Hil all, Anyone is using tgext.asyncjob with uwsgi ? The behavior is very strange. It's like uwsgi does not allow threads to share a common queue. Note : asyncjobs were working through apache wsgi ; now that we work with nginx/uwsgi, the asyncjob thread does not communicate with web threads anymore...
Damien Le vendredi 6 janvier 2017 13:05:04 UTC+1, Bastien Sevajol a écrit : > > Hello, > > We have troubles with *tgext.asyncjob* and *uwsgi*. *tgext.asyncjob* > worker didn't receive job when project is started with uwsgi as a service. > To resume when it's working or not: > > (*Debian 8.5*) > > - Project started with gearbox: working > - Project started with uwsgi cli command and following ini config: > working > - Project started with uwsgi service and following ini config: NOT > working > - Project started with uwsgi service and following ini config AND > lazy-apps > <http://uwsgi-docs.readthedocs.io/en/latest/Options.html#lazy-apps> > option: working > > *Note: We can't use lazy-apps uwsgi option because breaking some parts of > our project.* > > The uwsgi ini config is the following: > > [uwsgi] > plugins = python3 > chdir = /home/bastien/Projects/tracim/tracim > home = /home/bastien/.virtualenvs/tracim_dev > module = wsgi > callable = application > socket = /var/run/uwsgi/app/algoo.trac.im.local/socket > enable-threads = true > > > During our debugging, wa can affirm this: Code who request job correctly > reach *tgext.asyncjob.queue.AsyncJobQueue#perform* (and make correctly > the *queue.Queue#put*). But in > *tgext.asyncjob.worker.AsyncWorkerThread#run*, following line: > > msg = self.queue.get() > > still waiting. It's like this queue is not the same in main program and > asyncjob thread. > > Do you hav any idea about this bug ? > > Best Regards, > Bastien. > -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/turbogears. For more options, visit https://groups.google.com/d/optout.

