Subject: Developers of Sympa
List archive
RE: [sympa-dev] Added "Upload File" to add_request(Multi Add), having trouble
- From: "Jason Holland" <address@concealed>
- To: "Adam Bernstein" <address@concealed>
- Cc: <address@concealed>
- Subject: RE: [sympa-dev] Added "Upload File" to add_request(Multi Add), having trouble
- Date: Thu, 20 Dec 2007 18:57:37 -0600
Hi Adam,
Thanks for the suggestion. Before I came up the the code I have now I wrote
some code to upload a file into the dump variable too. It timed out on large
files too so I wrote the code I posted.
I do think I came up with a solution with using the fork() statement though.
I may have something that will work without having to resort to learning ajax.
Thanks again!
Jason
-----Original Message-----
From: Adam Bernstein [mailto:address@concealed]
Sent: Thursday, December 20, 2007 6:45 PM
To: Jason Holland
Cc: address@concealed
Subject: Re: [sympa-dev] Added "Upload File" to add_request(Multi Add),
having trouble
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
-
[sympa-dev] Added "Upload File" to add_request(Multi Add), having trouble,
jholland, 12/20/2007
-
Re: [sympa-dev] Added "Upload File" to add_request(Multi Add), having,
Adam Bernstein, 12/21/2007
- RE: [sympa-dev] Added "Upload File" to add_request(Multi Add), having trouble, Jason Holland, 12/21/2007
-
Re: [sympa-dev] Added "Upload File" to add_request(Multi Add), having,
Olivier Salaün, 12/21/2007
- Re: [sympa-dev] Added "Upload File" to add_request(Multi Add), having, Adam Bernstein, 12/22/2007
-
Re: [sympa-dev] Added "Upload File" to add_request(Multi Add), having,
Adam Bernstein, 12/21/2007
Archive powered by MHonArc 2.6.19+.