Re: Long time process and FCGI

2007-03-30 Thread Anderson Santos
Thank you, again. Now I think I have enough information to find my way =D On 3/30/07, xgdlm <[EMAIL PROTECTED]> wrote: > > > I am just not sure about how to call the shell script. > > I would call the shell script withing a cronjob command : > python /path/to/sendmail.py > > this script would

Re: Long time process and FCGI

2007-03-30 Thread xgdlm
> I am just not sure about how to call the shell script. I would call the shell script withing a cronjob command : python /path/to/sendmail.py this script would do someting roughly like : - if there_is_a_mailing_to_send : for mail in mailtosend : do send mail - > read from a

Re: Long time process and FCGI

2007-03-30 Thread Anderson Santos
I was looking for how to execute a script and I was just thinking how to use django code and here is your e-mail! Thank you! I am just not sure about how to call the shell script. should I use the os.system(command) or the os.popen ? That seems that popen just return when I close the script

Re: Long time process and FCGI

2007-03-30 Thread xgdlm
Hello, Sending email within a view seems to me quite a strange process :) You should send your emails within a shell python (or whatever) process. What I would do ... I would within my view, write some kind of data to a database or a text file or whatever. Then, have a cronjob that check that

Re: Long time process and FCGI

2007-03-30 Thread Anderson Santos
In my case, it's quite urgent (it must work today), so do you have any example to execute this external script? Is it simple python (*.py) files? I was reading the link you sent, it's really interesting and it could be useful in a visual progress process, I will try it with another project.

Re: Long time process and FCGI

2007-03-30 Thread Atilla
Well, one thing that you could do is to execute an external script from your view. Then you'd immediatelly return from the view, and the script could mail them in the background. That is, of course, if you don't need any feedback to be displayed. If you do need to do something like that, you'll

Re: Long time process and FCGI

2007-03-29 Thread Anderson Santos Silva
That's exactly what I thought when I dealed with that, but I can't imagine a separated process running in the background and return a response to the user that his "action" was activated if every method waits to get back instead of a kind of thread operation. (Yes, I came from windows

Re: Long time process and FCGI

2007-03-29 Thread Atilla
Hello, By the looks of it, mod_fcgi has a limit as to how much time it could wait for response from a script. Since you're doing a heavy operation that takes a while, i guess it times out. The point is - if your executed action takes so much time, you're clearly having a wrong conception on

Long time process and FCGI

2007-03-29 Thread Anderson Santos Silva
Hello, I have a process that sends an e-mail to more then 5000 addresses (grouping it in 50 each time) and after a while it gives me the error: --- Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact