Skip to content
Snippets Groups Projects
Commit 1f312613 authored by Leo Gordon's avatar Leo Gordon
Browse files

make SystemCmd disconnect from the database for the duration of execution of its command

parent 850cfcc6
No related branches found
No related tags found
No related merge requests found
......@@ -88,10 +88,15 @@ sub run {
my $self = shift;
my $cmd = $self->param('cmd');
$self->dbc->disconnect_when_inactive(1); # release this connection for the duration of system() call
if(my $return_value = system($cmd)) {
$return_value >>= 8;
die "system( $cmd ) failed: $return_value";
}
$self->dbc->disconnect_when_inactive(0); # allow the worker to keep the connection open again
}
=head2 write_output
......
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