Skip to content

Commit 7be0f52

Browse files
committed
Use signatures in lib/OpenQA/Schema/ResultSet/Jobs.pm
1 parent 0e363ab commit 7be0f52

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

lib/OpenQA/Schema/ResultSet/Jobs.pm

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ job that matches the settings provided as argument. Useful to find the
3838
latest build for a given pair of distri and version.
3939
4040
=cut
41-
sub latest_build {
42-
my ($self, %args) = @_;
41+
sub latest_build ($self, %args) {
4342
my @conds;
4443
my %attrs;
4544
my $rsource = $self->result_source;
@@ -110,9 +109,7 @@ sub latest_jobs ($self, $until = undef) {
110109
return @latest;
111110
}
112111

113-
sub create_from_settings {
114-
my ($self, $settings, $scheduled_product_id) = @_;
115-
112+
sub create_from_settings ($self, $settings, $scheduled_product_id = undef) {
116113
my %settings = %$settings;
117114
my %new_job_args;
118115

@@ -427,9 +424,7 @@ sub cancel_by_settings (
427424
return $cancelled_jobs;
428425
}
429426

430-
sub next_previous_jobs_query {
431-
my ($self, $job, $jobid, %args) = @_;
432-
427+
sub next_previous_jobs_query ($self, $job, $jobid, %args) {
433428
my $p_limit = $args{previous_limit};
434429
my $n_limit = $args{next_limit};
435430
my @params = (
@@ -452,9 +447,7 @@ sub next_previous_jobs_query {
452447
}
453448

454449

455-
sub stale_ones {
456-
my ($self) = @_;
457-
450+
sub stale_ones ($self) {
458451
my $dt = DateTime->from_epoch(
459452
epoch => time() - OpenQA::App->singleton->config->{global}->{worker_timeout},
460453
time_zone => 'UTC'
@@ -472,9 +465,7 @@ sub stale_ones {
472465
return $self->search(\%overall_cond, \%attrs);
473466
}
474467

475-
sub mark_job_linked {
476-
my ($self, $jobid, $referer_url) = @_;
477-
468+
sub mark_job_linked ($self, $jobid, $referer_url) {
478469
my $referer = Mojo::URL->new($referer_url);
479470
my $referer_host = $referer->host;
480471
my $app = OpenQA::App->singleton;

0 commit comments

Comments
 (0)