Skip to Content.
Sympa Menu

devel - Re: [sympa-dev] Added "Upload File" to add_request(Multi Add), having

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Olivier Salaün <address@concealed>
  • To: Adam Bernstein <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-dev] Added "Upload File" to add_request(Multi Add), having
  • Date: Fri, 21 Dec 2007 09:36:34 +0100

Adam,

Could you submit the related patch in our tracking system ?
If you already did it, please remind me of the request ID.

Thanks.

Adam Bernstein a écrit :
Hey Jason -- I added the same feature on one of the systems we built, only I read the uploaded data directly into the "dump" variable in do_add() (which is populated by the add_request form) instead of calling an external system command to parse the data. The code otherwise looks similar to yours, with the key difference being this little doodad:

my $fh = $query->upload('uploaded_file');
while (<$fh>) {
$dump .= $_;
}

Maybe a bit of simplification you can do too?

I tried to upload about 65,000 emails and the web page gets directed to a
"server error" page. Eventually all the emails get added to the list but I
don't know if there is a way to keep that error page from displaying?

I believe the Web server is just timing out the connection to the script, thinking that it's gone unresponsive, and you can control that by raising the -idle-timeout parameter on the FastCgiServer (or FastCgiConfig) line in httpd.conf -- I think we set ours to 5 or 10 minutes (300-600 seconds).

Is there a way to kick off my system command (cat /tmp/my_import_file |
/usr/lib/sympa/bin/sympa.pl --address@concealed) and have the script
return to a page that says the upload is in progress?

Now that is a very good idea. And might be easier with your architecture, using the external command, although I think the part that takes the most time where you would want the status monitor is on the actual browser-to-server upload call, not the parsing of the subscriber list. I think monitoring that file upload would require a pretty low-level widget, and I don't know where you'd find such a thing, but somebody was just telling me about a library of such tools (must be PHP-based) that Drupal has started incorporating....

ab




Archive powered by MHonArc 2.6.19+.

Top of Page