[RAS] Can't add papers to profile
Ivan Kurmanov
duraley at gmail.com
Mon Jul 13 08:56:39 EDT 2009
what does updareq RePEc / result with? does it fail?
it appears very stupid to me to monitor filesystem to run update
deamon which then monitors filesystem. (in a way)
-ivan
On Mon, Jul 13, 2009 at 3:47 PM, Thomas Krichel<krichel at openlib.org> wrote:
>
>
> I have no solution, but I have written a workaround,
> firing up rid for an archive when there are some changes
> in that archive. This is done at rsyncing time from
> raneb. The following says it all.
>
> adrepec at raneb:~/perl$ cat rsync_to_nebka_with_rid
> #!/usr/bin/perl
>
> my $home=$ENV{'HOME'};
> my $tmp_file="/tmp/rsync_to_nebka_with_rid";
> my $exclude_file="$home/etc/nebka_repec_remo.exclude";
> my $rsync="rm $tmp_file ; /usr/bin/rsync -va --exclude-from $exclude_file --delete $home/RePEc/opt/remo/ 'adrepec\@nebka:RePEc/remo' > $tmp_file";
>
> #print "$rsync\n";
> system($rsync);
>
> #
> # parse tmp_file, collect archives to do
> #
> my $archive_to_do;
> foreach my $line (`cat $tmp_file`) {
> chomp $line;
> if($line=~m|[^/]\.rdf$|i) {
> #print "found: $line\n";
> if($line=~m|^([^/]{3})/|) {
> $archive_to_do->{$1}=1;
> }
> }
> }
>
> foreach my $archive (keys %{$archive_to_do}) {
> my $s="ssh aras\@nebka acis/bin/updareq RePEc /$archive 31556926";
> print "$s\n";
> system($s);
> sleep 300;
> }
>
>
>
> Cheers,
>
> Thomas Krichel http://openlib.org/home/krichel
> RePEc:per:1965-06-05:thomas_krichel
> skype: thomaskrichel
> Thomas Krichel writes
>>
>> Thomas Krichel writes
>>
>> > Still not knowing where that function lives, I have
>> > now just commented this part of the code where the
>> > client dies, in Update.pm
>> >
>> > if ( $ABORT ) { return 0; }
>> >
>> > ## commented out to circumvent files_list bug
>> > ##
>> > ##my $flist = $drecord->files_list();
>> > ##foreach ( @$flist ) {
>> > ## if ( $children{$_} ) {
>> > ## } else {
>> > ## $self->disappeared_file( "$dir$_" ); # XXX
>> > ## if ( $ABORT ) { return 0; }
>> > ## while ( $PAUSE ) { sleep 3; }
>> > ## }
>> > ##}
>> >
>> The current arrangements are more sophisticated.
>>
>> ## commented out to circumvent files_list bug
>> my $flist = eval { $drecord->files_list(); } || [];
>> if($@) {
>> error(Dumper $drecord);
>> }
>> foreach ( @$flist ) {
>> if ( $children{$_} ) {
>> }
>> else {
>> $self->disappeared_file( "$dir$_" ); # XXX
>> if ( $ABORT ) { return 0; }
>> while ( $PAUSE ) { sleep 3; }
>> }
>> }
>>
>> eval {
>> $drecord -> files_list_set ( \@children );
>> };
>> $drecord -> last_observed_set ( $session_time );
>>
>>
>>
>> I just added the
>>
>> if($@) {
>> error(Dumper $drecord);
>> }
>>
>> with a
>>
>> use Data::Dumper;
>>
>> at the top, maybe that will point to the error.
>>
>> Cheers,
>>
>> Thomas Krichel http://openlib.org/home/krichel
>> RePEc:per:1965-06-05:thomas_krichel
>> skype: thomaskrichel
>>
>> _______________________________________________
>> RAS-run mailing list
>> RAS-run at lists.openlib.org
>> http://lists.openlib.org/cgi-bin/mailman/listinfo/ras-run
>
> --
>
>
> Cheers,
>
> Thomas Krichel http://openlib.org/home/krichel
> RePEc:per:1965-06-05:thomas_krichel
> skype: thomaskrichel
>
> _______________________________________________
> RAS-run mailing list
> RAS-run at lists.openlib.org
> http://lists.openlib.org/cgi-bin/mailman/listinfo/ras-run
>
More information about the RAS-run
mailing list