Jobsets: add a supportsDynamicRunCommand which also checks the project's dynamic runcommand support

This commit is contained in:
Graham Christensen 2022-01-24 16:11:52 -05:00
parent daa6864a58
commit 3aa2393091
2 changed files with 8 additions and 5 deletions

View file

@ -71,11 +71,7 @@ sub isBuildEligibleForDynamicRunCommand {
return 0;
}
if (! $build->jobset->enable_dynamic_run_command) {
return 0;
}
if (! $build->project->supportsDynamicRunCommand()) {
if (! $build->jobset->supportsDynamicRunCommand()) {
return 0;
}

View file

@ -386,6 +386,13 @@ __PACKAGE__->add_column(
"+id" => { retrieve_on_insert => 1 }
);
sub supportsDynamicRunCommand {
my ($self) = @_;
return $self->get_column('enable_dynamic_run_command') == 1
&& $self->project->supportsDynamicRunCommand();
}
sub as_json {
my $self = shift;