Mailing List Archive

rt-fulltext-indexer cron job
I was messing around with getting 4.2.1 set up with full text indexing,
using a postgresql db. When I got to the part of the instructions for
setting up the cron job, I noted the instructions advised that "Care should
be taken to insure that multiple instances of rt-fulltext-indexer are not
run at the same time." My solution for this was to install
*Sys::RunAlone*through cpan and then add to the
*rt-fulltext-indexer* script the following line:

*use Sys::RunAlone;*

I placed this after the *use warnings;* line near the head of the file

I had to add *__END__* to the end of the file to use the library, but when
I intentionally triggered the script twice, the response to the second
trigger was:

"*A copy of '/opt/rt4/sbin/rt-fulltext-indexer' is already running*"

VL
quis custodiet ipsos custodes
Re: rt-fulltext-indexer cron job [ In reply to ]
On Fri, 2013-11-22 at 10:04 -0500, Vernon McCandlish wrote:
> I was messing around with getting 4.2.1 set up with full text
> indexing, using a postgresql db. When I got to the part of the
> instructions for setting up the cron job, I noted the instructions
> advised that "Care should be taken to insure that multiple instances
> of rt-fulltext-indexer are not run at the same time." My solution for
> this was to install Sys::RunAlone through cpan and then add to the
> rt-fulltext-indexer script the following line:
>
>
> use Sys::RunAlone;

Cute -- the implementation of that module is a bit fascinating. Since
it adds a dependency, not something we can add to either of the stable
series. I'd take this as a pull request against master, or to 4.0-trunk
if protected with an eval{} for environments which don't have it
installed.

- Alex