X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=scripts%2Ffetchdumps.pl;h=71c0c2b88c350c5eae4f48c88e309e885383d610;hb=f3cd955b85092ea418d9c1de90be49c9f598527f;hp=2579f38532688463e9b3a7a4ad07f0c6da32f7eb;hpb=5b6c3c7d0003d636c1c3da6d25734e4aad5736a5;p=ndwebbie.git diff --git a/scripts/fetchdumps.pl b/scripts/fetchdumps.pl index 2579f38..71c0c2b 100755 --- a/scripts/fetchdumps.pl +++ b/scripts/fetchdumps.pl @@ -22,12 +22,16 @@ q{ use strict; use warnings; +use local::lib; use DBI; use DBD::Pg qw(:pg_types); -use LWP::Simple; +use LWP::Simple qw/head get $ua/; +$ua->agent("Stupid user agent check is stupid"); + +use FindBin; +use lib "$FindBin::Bin/../lib"; -use lib qw{/var/www/ndawn/lib/}; use ND::DB; our $dbh = ND::DB::DB(); @@ -51,13 +55,11 @@ for my $type ("planet","alliance","galaxy"){ } if ($updated){ - `/var/www/ndawn/scripts/parsealliances.pl $updated`; - `/var/www/ndawn/scripts/parseplanets.pl $updated`; - `/var/www/ndawn/scripts/parsegalaxies.pl $updated`; - `/var/www/ndawn/scripts/ndrank.pl`; + system("$FindBin::Bin/parsetick.sh", $updated); + system("$FindBin::Bin/ndrank.pl"); $dbh->do(q{UPDATE misc SET value = ? WHERE id = 'TICK'}, undef, $updated); + system 'killall','-USR1', 'ndbot.pl'; local $dbh->{Warn} = 0; - $dbh->do(q{VACUUM ANALYZE}); }