summary refs log tree commit diff
path: root/clean-country.pl
diff options
context:
space:
mode:
Diffstat (limited to 'clean-country.pl')
-rw-r--r--clean-country.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/clean-country.pl b/clean-country.pl
index 9fb0b5c..7a99e99 100644
--- a/clean-country.pl
+++ b/clean-country.pl
@@ -11,11 +11,12 @@ my $conf = LoadFile(shift);
 
 my $schema = githubexplorer::Schema->connect(@{$conf->{connect_info}});
 
-my $profiles = $schema->resultset('Profiles')->search({id => {'>' => 55781}, location => {'!=' =>
+my $profiles = $schema->resultset('Profiles')->search({id => {'>' => 61498}, location => {'!=' =>
             undef}, location => {'!=' => ''}});
 
 my $geo = Geo::GeoNames->new();
 
+my $i = 0;
 while (my $pr = $profiles->next) {
     next if $pr->location =~ /^http/;
     next if $pr->country;
@@ -30,5 +31,8 @@ while (my $pr = $profiles->next) {
         next if $@;
         say "** fix with ".$pr->city . " in ".$pr->country;
     }
-    sleep(1);
+    if (++$i == 10) {
+        sleep(2);
+        $i = 0;
+    }
 }
\ No newline at end of file