Changeset d389947
- Timestamp:
- Dec 27, 2009, 12:04:28 AM (15 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- f2adf6c
- Parents:
- 4ae10de
- git-author:
- Nelson Elhage <nelhage@mit.edu> (12/23/09 14:22:27)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (12/27/09 00:04:28)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/BarnOwl/Module/Twitter/Handle.pm
re4e1dcb rd389947 29 29 use BarnOwl; 30 30 use BarnOwl::Message::Twitter; 31 use POSIX qw(asctime); 31 32 32 33 sub fail { … … 178 179 if(exists($ratelimit->{remaining_hits}) 179 180 && $ratelimit->{remaining_hits} <= 0) { 180 $self->sleep($ratelimit->{reset_time_in_seconds} - time + 60); 181 die("Twitter: ratelimited until " . $ratelimit->{reset_time} . "\n"); 181 my $timeout = $ratelimit->{reset_time_in_seconds}; 182 $self->sleep($timeout - time + 60); 183 BarnOwl::error("Twitter" . 184 ($self->{cfg}->{account_nickname} ? 185 "[$self->{cfg}->{account_nickname}]" : "") . 186 ": ratelimited until " . asctime(localtime($timeout))); 182 187 } elsif(exists($ratelimit->{error})) { 183 188 $self->sleep(60*20);
Note: See TracChangeset
for help on using the changeset viewer.