summaryrefslogtreecommitdiff
path: root/clean-country.pl
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-02-12 16:55:30 +0100
committerfranck cuny <franck@lumberjaph.net>2010-02-12 16:55:30 +0100
commit065006816f3d5d69b67816a54131a00d88487403 (patch)
tree87f44abc2f66b1100703bacc6bd934297087b1b0 /clean-country.pl
parentwip (diff)
downloadgithub-explorer-065006816f3d5d69b67816a54131a00d88487403.tar.gz
small pause
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