Re: [Nolug] Monitor incoming files and...

From: Jimmy Hess <mysidia_at_gmail.com>
Date: Sat, 23 Jun 2012 07:52:20 -0500
Message-ID: <CAAAwwbXmGjJDiCOyd5KKC_s=kvnaeDudX5FJ=hriarhhde1_FA@mail.gmail.com>

On 6/22/12, Petri Laihonen <pietu@weblizards.net> wrote:
libiconv / PHP mb_convert_encoding are available as long as the
write PHP modules are installed or compiled in.

It would be ideal to inline all this logic with your upload process,
rather than run a separate daemon. You should have better
performance, and fewer chances for a race condition that way.
Process uploads to a temporary directory, then create a new second
temporary file,
delete the original, and move the converted file to a different directory
with an atomic rename() operation, to mark completion of the upload.

And don't tell the remote user the upload was successful until all
those operations succeeded.

> I would most likely do it with PHP script which would be running as daemon
> managed by supervisor. (i.e. PHP does not have to daemonize itself, since
> supervisor is doing it)
>
> http://php.net/manual/en/function.iconv.php

> P

--
-JH
___________________
Nolug mailing list
nolug@nolug.org
Received on 06/23/12

This archive was generated by hypermail 2.2.0 : 07/25/13 EDT