asynchronous python call

2009-04-08 Thread joeygartin
Complete newbie, so forgive my improper use of Python terminology.

I am working with Django and I have to send off a number of emails
after a person has filled out a form.  What I want is to make a call
that goes off to form and send the emails and redirect the user to
another view.  I have this working now, but I noticed it is a bit
slow.  So I was hoping there was a way to spin off the process and
redirect the user to the page while the emails are being formed and
sent vs. making the page hang while it is done.

Thank you!
--
http://mail.python.org/mailman/listinfo/python-list


email in separate thread

2009-04-10 Thread joeygartin
Greetings,

Disclosure:  I am a total newbie!

I am building an application Django and come to a dilemna when sending
off emails.  I have an application that sends off an email after a
customer has filled out a form, actually it sends off 7 emails.

The problem is the page hangs while the emails are sent.  My current
hosting situation does not give me direct access to an email queue.
So I have two options (that I can think of):

1) Write the email information to a file and then run a cron job in
the background that routinely checks the file and sends the necessary
emails off

OR

2) Spin-off a thread (which I have no background with at all!) for the
emails and be able to redirect the user to the next page.

I have posted this problem on the Django users group, but did not
really get a usable response.  If any of you have dealt with this or
know of an actual solution, please help.

Thank you!
--
http://mail.python.org/mailman/listinfo/python-list