Skip to content

Commit 92286c8

Browse files
authored
Merge pull request #6674 from os-autoinst/refactor/rm_running_hooks
Cleanup unused parameter in streamtext
2 parents f116128 + 2127d58 commit 92286c8

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

lib/OpenQA/Shared/Controller/Running.pm

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,10 @@ sub edit ($self) {
7575
$self->redirect_to('edit_step', moduleid => $running_module->name(), stepid => $stepid);
7676
}
7777

78-
sub streamtext ($self, $file_name, $start_hook = undef, $close_hook = undef) {
78+
sub streamtext ($self, $file_name) {
7979
my $job = $self->stash('job');
8080
my $worker = $job->worker;
81-
$start_hook ||= sub (@) { };
82-
$close_hook ||= sub (@) { };
8381
my $logfile = $worker->get_property('WORKER_TMPDIR') . "/$file_name";
84-
85-
$start_hook->($worker, $job);
8682
$self->render_later;
8783
Mojo::IOLoop->stream($self->tx->connection)->timeout(900);
8884
my $res = $self->res;
@@ -147,11 +143,7 @@ sub streamtext ($self, $file_name, $start_hook = undef, $close_hook = undef) {
147143
});
148144

149145
# Stop monitoring the logfile when the connection closes
150-
$self->on(
151-
finish => sub (@) {
152-
Mojo::IOLoop->remove($timer_id);
153-
$close_hook->($worker, $job);
154-
});
146+
$self->on(finish => sub (@) { Mojo::IOLoop->remove($timer_id); });
155147
}
156148

157149
sub livelog ($self) {

0 commit comments

Comments
 (0)