tgext.asyncjob and multithreaded Server

30 views
Skip to first unread message

Moritz Schlarb

unread,
Mar 18, 2013, 9:11:13 AM3/18/13
to TurboGears
Hi there everyone,

Is my assumption right, that when I use tgext.asyncjob and a
multithreaded server environment (like Paster with multiple threads),
each of the server instances will have it's own asyncjob worker thread
which don't share any information so different threads won't be able to
see statusses about jobs in other threads?

Regards

--
Moritz Schlarb

Alessandro Molina

unread,
Mar 18, 2013, 10:46:42 AM3/18/13
to TurboGears .
yes, threads share their status, but processes don't.
If you need such a feature you probably want to give a look to an asyncrhonous queue. I wanted to provide redis backend to asyncjob for a long time, but I didn't have time to do so yet :/



--
Moritz Schlarb

--
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 turbogears+...@googlegroups.com.
To post to this group, send email to turbo...@googlegroups.com.
Visit this group at http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



Craig Small

unread,
Mar 19, 2013, 5:36:52 AM3/19/13
to TurboGears
On Mon, Mar 18, 2013 at 02:11:13PM +0100, Moritz Schlarb wrote:
> which don't share any information so different threads won't be able to
> see statusses about jobs in other threads?
I'm using zeroMQ for my inter-thread communications for my backend stuff
(there's a fair bit of that going on). But yes, you need something do do
that sort of communication.

- Craig
--
Craig Small VK2XLZ http://enc.com.au/ csmall at : enc.com.au
Debian GNU/Linux http://www.debian.org/ csmall at : debian.org
GPG fingerprint: 5D2F B320 B825 D939 04D2 0519 3938 F96B DF50 FEA5

Alessandro Molina

unread,
May 19, 2013, 9:19:43 AM5/19/13
to TurboGears
Pointing out that there is now a development version of tgext.asyncjob that support sharing task status on Redis, so that it can be used between multiple processes.

It will probably be released next week.
Reply all
Reply to author
Forward
0 new messages