Commit cf43a00b authored by Mac Newbold's avatar Mac Newbold
Browse files

Move mail throttle setup before the first place you could possible send mail.

parent 126635bd
...@@ -86,6 +86,11 @@ my $TBNODEOPMODE = TBDB_TBEVENT_NODEOPMODE; ...@@ -86,6 +86,11 @@ my $TBNODEOPMODE = TBDB_TBEVENT_NODEOPMODE;
my $TBCONTROL = TBDB_TBEVENT_TBCONTROL; my $TBCONTROL = TBDB_TBEVENT_TBCONTROL;
my $TB_OSID_MBKERNEL = TB_OSID_MBKERNEL; my $TB_OSID_MBKERNEL = TB_OSID_MBKERNEL;
# Set up some notification throttling
my $mailgap = 15; # in seconds
my $lastmail = time() - $mailgap + 2; # Send a digest of startup msgs after 2s.
my %msgs = ();
my $pidfile; my $pidfile;
$pidfile = "$TB/locks/stated.pid"; $pidfile = "$TB/locks/stated.pid";
debug("Using pidfile $pidfile\n"); debug("Using pidfile $pidfile\n");
...@@ -166,11 +171,6 @@ $SIG{ABRT} = \&cleanup; ...@@ -166,11 +171,6 @@ $SIG{ABRT} = \&cleanup;
$SIG{TERM} = \&cleanup; $SIG{TERM} = \&cleanup;
$SIG{KILL} = \&cleanup; $SIG{KILL} = \&cleanup;
# Set up some notification throttling
my $mailgap = 15; # in seconds
my $lastmail = time - $mailgap + 2; # Send a digest of startup msgs after 2s.
my %msgs = ();
# Track if I handled an event or not # Track if I handled an event or not
my $event_count = 0; my $event_count = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment