Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] (no subject)

From: Peter Karman <peter(at)not-real.peknet.com>
Date: Thu Sep 13 2007 - 13:45:30 GMT
On 09/11/2007 03:53 AM, Michelangelo Rezzonico wrote:

> I have the following situation:
> 
>  
> 
> A user delete a file from the file-system: example “/tmp/file.doc”
> 
>  
> 
> After 5 mins, a cron-job starts the following command:
> 
>  
> 
> /usr/local/bin/swish-e –r –i “/tmp/file.doc”
> 
>  
> 
> The file is not removed from the index because it doesn’t exists (on the
> file-system).
> 
>  
> 
> How can I solve this problem ?
> 
> Note: the option to delete the file in the cron-job is not applicable in
> my situation.
> 
>  

the problem is that swish-e tries to stat() the file -- you get a catch-22
situation.

Maybe try the -S prog method with something like this (UNTESTED):

 % echo "Path-Name: /tmp/file.doc\nContent-Length: 0\nUpdate-Mode: Remove\n\n"\
   | swish-e -S prog -i stdin



-- 
Peter Karman  .  peter(at)not-real.peknet.com  .  http://peknet.com/

_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Thu Sep 13 09:45:29 2007