Re: Using session in new thread
OK, I haven't any exceptions now, but I can't update or insert new values in session :( thread.start_new_thread(self._check_user, (session._current_obj(), user)) def _check_user(self, threadSession, user): threadSession['something'] = 'somethingelse' threadSession.save() Nothing change in my session :( On 26 Sty, 11:25, DD d2n...@gmail.com wrote: I think the session is StackedObjectProxy. session._current_obj() will get you the actual instance that you can then pass on to your thread. I am really not sure on the thread-safety of this, may be someone else can chime in. DD. sniipe wrote: Any idea? On Jan 22, 1:21 pm, sniipesni...@gmail.com wrote: Hi! Is it possible to use session in created thread in my action, like: ... from pylons import session import thread ... class UsersController(BaseController): def _check_user(self, user): # do something with session object ... def some_action(self, user): ... thread.start_new_thread(self._check_user, (user,)) ... When I try to do it this way I received exception: TypeError: No object (name: session) has been registered for this thread Do I need to register session in thread? How? :) I will create thread because I don't want to wait for some code to finish job. Thanks in advance for your help :) -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: Using session in new thread
Any idea? On Jan 22, 1:21 pm, sniipe sni...@gmail.com wrote: Hi! Is it possible to use session in created thread in my action, like: ... from pylons import session import thread ... class UsersController(BaseController): def _check_user(self, user): # do something with session object ... def some_action(self, user): ... thread.start_new_thread(self._check_user, (user,)) ... When I try to do it this way I received exception: TypeError: No object (name: session) has been registered for this thread Do I need to register session in thread? How? :) I will create thread because I don't want to wait for some code to finish job. Thanks in advance for your help :) -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Using session in new thread
Hi! Is it possible to use session in created thread in my action, like: ... from pylons import session import thread ... class UsersController(BaseController): def _check_user(self, user): # do something with session object ... def some_action(self, user): ... thread.start_new_thread(self._check_user, (user,)) ... When I try to do it this way I received exception: TypeError: No object (name: session) has been registered for this thread Do I need to register session in thread? How? :) I will create thread because I don't want to wait for some code to finish job. Thanks in advance for your help :) -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: pylonshq.com down?
Me too... On 12 Paź, 16:21, Scott Sharkey sshar...@linuxunlimited.com wrote: Is it just me, or is pylonshq.com down? -Scott --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
How to run pylons (paster) without enter certificate password ?
Hi! Is it a simple way to run daemon (paster) using certificate? Before every start of paster I have to enter my 'certificate password'. Maybe is it a parameter to use it in command line? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Pylons with gzip compression?
thanks :) everything works :) In my opinion it should be implemented by default :P On 19 Gru, 09:14, Dalius Dobravolskas dalius.dobravols...@gmail.com wrote: Hi, I am beginning and I have one question about running Pylons(paster) v0.9.6 with gzip compression(for pages) How to do it? :) Two ways: 1) Search for gzipmiddleware here:http://pylonsbook.com/alpha1/wsgi Actually it would be nice if this middleware were available in Pylons by default. Maybe it is? 2) Serve behind apache and use apache's modules (mod_deflate); -- Daliushttp://blog.sandbox.lt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---