diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-03-31 18:50:08 +0200 | 
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-03-31 18:50:08 +0200 | 
| commit | 0f44e92ba4b71683cbd3e7e783929a0ae75e244a (patch) | |
| tree | a13586cbc8b1b6986f823f0e0419f353ec6376e1 /lib/Travelynx | |
| parent | e9f0e2013dfe4e19fd7c7d80f1218acb026803a7 (diff) | |
work: log count of generic backend issues to influxdb as well
Diffstat (limited to 'lib/Travelynx')
| -rw-r--r-- | lib/Travelynx/Command/work.pm | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm index 00dc27e..fbd70a6 100644 --- a/lib/Travelynx/Command/work.pm +++ b/lib/Travelynx/Command/work.pm @@ -36,6 +36,7 @@ sub run {  	}  	my $errors             = 0; +	my $backend_issues     = 0;  	my $rate_limit_counts  = 0;  	my $dbris_rate_limited = 0; @@ -144,6 +145,9 @@ sub run {  							$dbris_rate_limited = 1;  							$rate_limit_counts += 1;  						} +						else { +							$backend_issues += 1; +						}  					}  				)->wait; @@ -263,6 +267,7 @@ sub run {  				)->catch(  					sub {  						my ($err) = @_; +						$backend_issues += 1;  						if ( $err  							=~ m{svcResL\[0\][.]err is (?:FAIL|PARAMETER)$} )  						{ @@ -471,6 +476,7 @@ sub run {  				)->catch(  					sub {  						my ($error) = @_; +						$backend_issues += 1;  						$self->app->log->error(  							"work($uid) @ IRIS: arrival: $error");  						$errors += 1; @@ -494,12 +500,12 @@ sub run {  		if ( $self->app->mode eq 'development' ) {  			$self->app->log->debug( 'POST '  				  . $self->app->config->{influxdb}->{url} -				  . " worker runtime_seconds=${worker_duration},errors=${errors},ratelimit_count=${rate_limit_counts}" +				  . " worker runtime_seconds=${worker_duration},errors=${errors},backend_errors=${backend_issues},ratelimit_count=${rate_limit_counts}"  			);  		}  		else {  			$self->app->ua->post_p( $self->app->config->{influxdb}->{url}, -"worker runtime_seconds=${worker_duration},errors=${errors},ratelimit_count=${rate_limit_counts}" +"worker runtime_seconds=${worker_duration},errors=${errors},backend_errors=${backend_issues},ratelimit_count=${rate_limit_counts}"  			)->wait;  		}  	} | 
