comparison scan.pl @ 22:552528bb4917

refined the cache timeout is 12 hours.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Wed, 08 Oct 2008 19:27:54 +0800
parents 5635e75c92d0
children 51a35c3d057e
comparison
equal deleted inserted replaced
21:d5e02a25b000 22:552528bb4917
27 } 27 }
28 28
29 printf("city %d %s saved\n", $city->{cityId}, $city->{cityname}); 29 printf("city %d %s saved\n", $city->{cityId}, $city->{cityname});
30 if(my $user = Ikariam::User->retrieve($city->{user})) 30 if(my $user = Ikariam::User->retrieve($city->{user}))
31 { 31 {
32 if($user->time le (time - 60*60)) { 32 if($user->time le (time - 60*60*12)) {
33 # Download user profile. 33 # Download user profile.
34 foreach my $x (qw/score army_score_main trader_score_secondary/) 34 foreach my $x (qw/score army_score_main trader_score_secondary/)
35 { 35 {
36 my $users = $::i->viewScore($x, $city->{owner}, 0); 36 my $users = $::i->viewScore($x, $city->{owner}, 0);
37 saveUser($users); 37 saveUser($users);