summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2009-12-21 22:01:43 +0100
committerfranck cuny <franck@lumberjaph.net>2009-12-21 22:01:43 +0100
commit7a98ef5fbfebdcc1d734274112e6edf55ff20846 (patch)
treea582ed6af9b3f0bb314470f83046083f4c31ae8b
parentsmall update (diff)
downloadlifestream-7a98ef5fbfebdcc1d734274112e6edf55ff20846.tar.gz
fix timer
-rw-r--r--lib/Lifestream.pm6
-rw-r--r--lib/Lifestream/Worker.pm10
-rw-r--r--lifestream.pl3
3 files changed, 5 insertions, 14 deletions
diff --git a/lib/Lifestream.pm b/lib/Lifestream.pm
index c101ff1..cca6309 100644
--- a/lib/Lifestream.pm
+++ b/lib/Lifestream.pm
@@ -8,11 +8,7 @@ use Lifestream::Worker;
 
 our $VERSION = '0.01';
 
-has config => (
-    is  => "rw",
-    isa => "HashRef"
-);
-
+has config => ( is => "rw", isa => "HashRef" );
 has schema => (
     is      => 'ro',
     isa     => 'Lifestream::Schema',
diff --git a/lib/Lifestream/Worker.pm b/lib/Lifestream/Worker.pm
index c22abcb..5718ad4 100644
--- a/lib/Lifestream/Worker.pm
+++ b/lib/Lifestream/Worker.pm
@@ -9,11 +9,7 @@ use Tatsumaki::HTTPClient;
 use Try::Tiny;
 use XML::Feed;
 
-has config => (
-    is  => "rw",
-    isa => "HashRef"
-);
-
+has config => ( is => "rw", isa => "HashRef" );
 has schema => (
     is      => 'ro',
     isa     => 'Lifestream::Schema',
@@ -28,10 +24,10 @@ has schema => (
 sub start {
     my $self = shift;
     my $t;
-    $t = AE::timer 0, 15, sub {
+    $t = AE::timer 0, 60, sub {
+        scalar $t;
         $self->fetch_feeds;
     };
-    #$self->fetch_feeds();
 }
 
 sub fetch_feeds {
diff --git a/lifestream.pl b/lifestream.pl
index faf20ea..88ca227 100644
--- a/lifestream.pl
+++ b/lifestream.pl
@@ -29,7 +29,7 @@ if ($deploy) {
 if ($add) {
     $schema->resultset('Feed')->create(
         {
-            feed_url         => $url,
+            feed_url    => $url,
             name        => $name,
             profile_url => $profile,
         }
@@ -38,7 +38,6 @@ if ($add) {
 
 if ($start) {
     my $app = Lifestream->app( config => LoadFile($config) );
-
     if ( $0 eq __FILE__ ) {
         require Tatsumaki::Server;
         Tatsumaki::Server->new(