vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[ljcom] r9670: LJSUP-7282: Process next user in twitter...

Committer: vad
LJSUP-7282: Process next user in twitter-digest worker immediately if previous fails
U   trunk/bin/worker/twitter-digest
Modified: trunk/bin/worker/twitter-digest
===================================================================
--- trunk/bin/worker/twitter-digest	2010-11-02 11:23:01 UTC (rev 9669)
+++ trunk/bin/worker/twitter-digest	2010-11-02 15:11:57 UTC (rev 9670)
@@ -27,7 +27,11 @@
 
     warn "Processing user $u->{user}" if $verbose;
 
-    my $res = LJ::TwitterDigest->post_digest($u);
+    my $res = eval { LJ::TwitterDigest->post_digest($u) };
+    if ($@) {
+        warn "failed to handle '" . $u->username . "' error: $@";
+        return 1; # so that the next user is processed immediately
+    }
 
     if ($verbose) {
         if ($res) {

Tags: ljcom, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments