Browse Source

fix issue with group names

themage
theMage 1 year ago
parent
commit
5a4f46ab18
1 changed files with 4 additions and 4 deletions
  1. 4 4
      lib/Hercules/Daemon.pm

+ 4 - 4
lib/Hercules/Daemon.pm

@ -128,7 +128,7 @@ sub post_child_start {
128 128
    = $self->{_cron_running}->{ $child->{pid} }
129 129
    = delete $self->{cron};
130 130
131
  $self->{_group_running}->{ $cron->{group_name} }++;
131
  $self->{_group_running}->{ $cron->cron_group }++;
132 132
133 133
  return;
134 134
}
@ -139,7 +139,7 @@ sub post_child_exit {
139 139
  my $cron = delete $self->{_cron_running}->{ $child->{pid} };
140 140
  return unless $cron;
141 141
142
  $self->{_group_running}->{ $cron->{group_name} }--;
142
  $self->{_group_running}->{ $cron->cron_group }--;
143 143
144 144
  print "$$: A child Ended\n";
145 145
  my $log;
@ -160,8 +160,8 @@ sub post_child_exit {
160 160
    unlink $child_log;
161 161
  }
162 162
  $cron->add_output( $child->{exit_code}, $log );
163
  
164
  if (my $gname = $cron->{group_name}) {
163
164
  if (my $gname = $cron->cron_group ) {
165 165
    my ($group) = grep {
166 166
        $_->group_name eq $gname
167 167
      } @{ $self->{__cron_groups} };