Skip to content

Commit

Permalink
Disconnect connection to hive database if not used. This is to avoid …
Browse files Browse the repository at this point in the history
…getting a failed job if it has been running for more than 8h
  • Loading branch information
Thomas Maurel committed Jul 26, 2017
1 parent 76df543 commit 73801c8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ sub run {
my $err = $self->param('err');
my $out = $self->param('out');

my $hive_dbc = $self->dbc;
$hive_dbc->disconnect_if_idle();

my $cmd = "perl $script " . join(' ', @args);
$self->warning($cmd);
$self->run_cmd("$cmd 1>$out 2>$err");
Expand Down

0 comments on commit 73801c8

Please sign in to comment.