Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
9db78370
Commit
9db78370
authored
Apr 20, 2016
by
Leo Gordon
Browse files
strict check for all provided arguments to help eliminate human error
parents
e71b03cb
63f6adcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm
modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm
+11
-5
No files found.
modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm
View file @
9db78370
...
...
@@ -514,17 +514,23 @@ sub add_objects_from_config {
warn
"
Adding Analyses ...
\n
";
foreach
my
$aha
(
@
{
$self
->
pipeline_analyses
})
{
my
%aha_copy
=
%$aha
;
my
(
$logic_name
,
$module
,
$parameters_hash
,
$input_ids
,
$blocked
,
$batch_size
,
$hive_capacity
,
$failed_job_tolerance
,
$max_retry_count
,
$can_be_empty
,
$rc_id
,
$rc_name
,
$priority
,
$meadow_type
,
$analysis_capacity
)
=
@
{
$aha
}{
qw(-logic_name -module -parameters -input_ids -blocked -batch_size -hive_capacity -failed_job_tolerance
-max_retry_count -can_be_empty -rc_id -rc_name -priority -meadow_type -analysis_capacity)
};
# slicing a hash reference
$max_retry_count
,
$can_be_empty
,
$rc_id
,
$rc_name
,
$priority
,
$meadow_type
,
$analysis_capacity
,
$wait_for
,
$flow_into
)
=
delete
@aha_copy
{
qw(-logic_name -module -parameters -input_ids -blocked -batch_size -hive_capacity -failed_job_tolerance
-max_retry_count -can_be_empty -rc_id -rc_name -priority -meadow_type -analysis_capacity -wait_for -flow_into)
};
# slicing a hash reference
my
@unparsed_attribs
=
keys
%aha_copy
;
if
(
@unparsed_attribs
)
{
die
"
Could not parse the following analysis attributes:
"
.
join
('
,
',
@unparsed_attribs
);
}
unless
(
$logic_name
)
{
die
"
logic_name' must be defined in every analysis
";
die
"
'-
logic_name' must be defined in every analysis
";
}
if
(
$seen_logic_name
{
$logic_name
}
++
)
{
die
"
an entry with logic_name '
$logic_name
' appears at least twice in the same configuration file, probably a typo
";
die
"
an entry with
-
logic_name '
$logic_name
' appears at least twice in the same configuration file, probably a typo
";
}
if
(
$rc_id
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment