diff scan.pl @ 255:b01560b95779

fixed cache time
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Mon, 17 Nov 2008 13:05:03 +0800
parents 1e4922d9a671
children 3b3f1306255a
line wrap: on
line diff
--- a/scan.pl	Mon Nov 17 13:01:10 2008 +0800
+++ b/scan.pl	Mon Nov 17 13:05:03 2008 +0800
@@ -122,16 +122,16 @@
         }
 
         # scanning the island
-        # 10 minutes cache.
-        if($island->time le (time - 60*10)) {
+        # 30 minutes cache.
+        if($island->time le (time - 60*30)) {
             my $i = $self->{ikariam}->clone();
             my @cities = 
                 $i->viewIsland($h_island->{id});
+            $self->saveCities($h_island->{id}, @cities);
             $island->set('time', time);
         }
         $island->update();
 
-        $self->saveCities($h_island->{id}, @cities);
         $pm->finish;
     }
     $pm->wait_all_children;