Skip to content
Browse files

Ignore initial tweet; don't kill CPU

tadzik++
  • Loading branch information...
1 parent f5e844f commit a76ec53ef1aa8e6156a5a0742b6da9791427fb95 @coke committed
Showing with 7 additions and 2 deletions.
  1. +7 −2 bin/cj.pl
View
9 bin/cj.pl
@@ -41,14 +41,19 @@
# preload a slightly old tweet.
# TODO: remember where we left off.
{
- my $age = 2;
+ my $age = 1;
my $tweets = get-tweets("rpp=$age");
my $tweet = $tweets<results>[*-1];
say "Adding initial tweet created: " ~ $tweet<created_at>;
- @tweets = $tweet;
+ # @tweets = $tweet;
$max-twitter-id = $tweet<id>;
}
+# MuEvent is eager, so add something to save the CPU.
+MuEvent::idle(
+ cb => sub { sleep 30; }
+);
+
# dump a single pending tweet, if any
MuEvent::timer(
after => 60,

0 comments on commit a76ec53

Please sign in to comment.
Something went wrong with that request. Please try again.