calling background/child processes
Hi everyone. When calling my ZClass_add method I want to call an external python method. Is there any way to let the method return immediately so that the script is running in the background? thanks a lot philipp dunkel ** ** ** ** ** ** ** ** pgp public key available gpg public key available ICQ# 60149094
The new scheduled DTMLMethod product, ZScheduler, can do that. Just schedule the method for "now". Only works with DTMLMethod's but they can call any other kind of method. The product is in alpha stages right now, so I wouldn't use it for a production environment just yet, but I would appreciate knowing whether it's useful for your application. See http://www.zope.org/Members/lstaffor/ZScheduler -- Loren ----- Original Message ----- From: Philipp Dunkel <phidu@gmx.net> To: <zope@zope.org> Sent: March 08, 2000 03:01 AM Subject: [Zope] calling background/child processes
Hi everyone. When calling my ZClass_add method I want to call an external python method. Is there any way to let the method return immediately so that the script is running in the background?
thanks a lot philipp dunkel ** ** ** ** ** ** ** ** pgp public key available gpg public key available ICQ# 60149094
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Philipp Dunkel wrote:
Hi everyone. When calling my ZClass_add method I want to call an external python method. Is there any way to let the method return immediately so that the script is running in the background?
Yes, spawn a new thread. WARNING this can cause havoc if not done properly. For example, if you want your seperate thread to be able to read and write data to the database, you MUST open a seperate connection to the DB. If your thread goes away, you MUST close that connection. There are a couple how-tos on the site that explain database connections. -Michel
participants (3)
-
Loren Stafford -
Michel Pelletier -
Philipp Dunkel