Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r17382: Event more debug info for ESN

Committer: gariev
Event more debug info for ESN
U   trunk/cgi-bin/LJ/ESN.pm
Modified: trunk/cgi-bin/LJ/ESN.pm
===================================================================
--- trunk/cgi-bin/LJ/ESN.pm	2010-09-15 12:25:33 UTC (rev 17381)
+++ trunk/cgi-bin/LJ/ESN.pm	2010-09-15 19:16:18 UTC (rev 17382)
@@ -3,7 +3,7 @@
 use Carp qw(croak);
 use LJ::Event;
 use LJ::Subscription;
-
+use Sys::Hostname qw/hostname/;
 use Data::Dumper;
 
 our $MAX_FILTER_SET = 5_000;
@@ -91,7 +91,8 @@
         my $grabbed_until = $job->grabbed_until;
         my $time = time;
         my ($short_class_name) = ($worker_class =~ /::(\w+)$/);
-        push @info, "c=$short_class_name j=$jobid f=$failures t=$time g=$grabbed_until p=$$ $extra_arg";
+        my $host = hostname();  ## this is not expensive, since Sys::Hostname caches result
+        push @info, "c=$short_class_name j=$jobid f=$failures t=$time g=$grabbed_until p=$$ h=$host $extra_arg";
     }
 
     return ('debug_info' => \@info); 

Tags: gariev, livejournal, pm
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