From 628bd319d627e94b0349391c2abce44fb51cab84 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 7 Jan 2023 13:07:29 +0100 Subject: work, traewelling: only push to influxdb in prod mode --- lib/Travelynx/Command/traewelling.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib/Travelynx/Command/traewelling.pm') diff --git a/lib/Travelynx/Command/traewelling.pm b/lib/Travelynx/Command/traewelling.pm index 5967b28..d8eeaef 100644 --- a/lib/Travelynx/Command/traewelling.pm +++ b/lib/Travelynx/Command/traewelling.pm @@ -126,8 +126,15 @@ sub run { if ( not $direction or $direction eq 'pull' ) { $report .= ",pull_runtime_seconds=${trwl_pull_duration}"; } - $self->app->ua->post_p( $self->app->config->{influxdb}->{url}, - "traewelling ${report}" )->wait; + if ( $self->app->mode eq 'development' ) { + $self->app->log->debug( 'POST ' + . $self->app->config->{influxdb}->{url} + . " traewelling ${report}" ); + } + else { + $self->app->ua->post_p( $self->app->config->{influxdb}->{url}, + "traewelling ${report}" )->wait; + } } } -- cgit v1.2.3