Show
Ignore:
Timestamp:
03/22/07 21:28:16 (11 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1174598896 +0000
git-parent:

[736d17033260fb886cb4627c6f05277ee834c5bc]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1174598896 +0000
Message:

make this more extensible and make Resmon auto 'use lib' based off \-tcsh

git-svn-id: https://labs.omniti.com/resmon/trunk@29 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/Resmon/Status.pm

    r736d170 r627a967  
    223223} 
    224224sub store { 
    225   my ($self, $type, $name, $state, $mess) = @_; 
    226   $self->{store}->{$type}->{$name} = { 
    227     last_update => time, 
    228     state => $state, 
    229     message => $mess 
    230   }; 
     225  my ($self, $type, $name, $info) = @_; 
     226  %{$self->{store}->{$type}->{$name}} = %$info; 
     227  $self->{store}->{$type}->{$name}->{last_update} = time; 
    231228  $self->store_shared_state(); 
    232229  if($self->{handle}) { 
    233     $self->{handle}->print("$name($type) :: $state($mess)\n"); 
     230    $self->{handle}->print("$name($type) :: $info->{state}($info->{message})\n"); 
    234231  } else { 
    235     print "$name($type) :: $state($mess)\n"; 
     232    print "$name($type) :: $info->{state}($info->{message})\n"; 
    236233  } 
    237234}