Skip to content

Commit 8632b55

Browse files
committed
Emit restart events when a job is enqueued
With this commit once the job goes to its end, it will check if it can restarted and if it fulfills the criteria, it will send the new job to the minion queue via `enqueue_restart`, where now it should populate the event. issue: https://progress.opensuse.org/issues/190557 Signed-off-by: Ioannis Bonatakis <[email protected]>
1 parent ad78558 commit 8632b55

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/OpenQA/Schema/Result/Jobs.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,6 +2050,7 @@ sub enqueue_restart ($self, $options = {}) {
20502050
my $openqa_job_id = $self->id;
20512051
my $minion_job_id = OpenQA::App->singleton->gru->enqueue(restart_job => [$openqa_job_id], $options)->{minion_id};
20522052
log_debug "Enqueued restarting openQA job $openqa_job_id via Minion job $minion_job_id";
2053+
OpenQA::App->singleton->emit_event(openqa_job_restart => \(id => $openqa_job_id));
20532054
return $minion_job_id;
20542055
}
20552056

0 commit comments

Comments
 (0)