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
31459df9
Commit
31459df9
authored
Jun 08, 2012
by
Leo Gordon
Browse files
a rc_id-less format of resource_classes() supported now; DO NOT MIX!!!
parent
215ec6ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm
modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm
+15
-6
No files found.
modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm
View file @
31459df9
...
...
@@ -143,8 +143,12 @@ sub pipeline_wide_parameters {
sub
resource_classes
{
my
(
$self
)
=
@_
;
return
{
1
=>
{
-
desc
=>
'
default
',
'
LSF
'
=>
''
},
2
=>
{
-
desc
=>
'
urgent
',
'
LSF
'
=>
'
-q yesterday
'
},
## Old style:
# 1 => { -desc => 'default', 'LSF' => '' },
# 2 => { -desc => 'urgent', 'LSF' => '-q yesterday' },
## New style:
'
default
'
=>
{
'
LSF
'
=>
''
},
'
urgent
'
=>
{
'
LSF
'
=>
'
-q yesterday
'
},
};
}
...
...
@@ -331,21 +335,26 @@ sub run {
my
$resource_classes
=
$self
->
resource_classes
;
my
%seen_resource_name
=
();
while
(
my
(
$rc_id
,
$mt2param
)
=
each
%$resource_classes
)
{
my
$name
=
delete
$mt2param
->
{
-
desc
};
if
(
$rc_id
!~
/^\d+$/
)
{
$name
=
$rc_id
;
}
if
(
!
$name
or
$seen_resource_name
{
$name
}
++
)
{
die
"
Every resource has to have a unique description, please fix the PipeConfig file
";
}
warn
"
Creating resource_class '
$name
'
(
$rc_id
)
.
\n
";
$resource_class_adaptor
->
create_new
(
-
DBID
=>
$rc_id
,
warn
"
Creating resource_class '
$name
'.
\n
";
my
$rc
=
$resource_class_adaptor
->
create_new
(
defined
(
$rc_id
)
?
(
-
DBID
=>
$rc_id
)
:
()
,
-
NAME
=>
$name
,
);
while
(
my
(
$meadow_type
,
$xparams
)
=
each
%$mt2param
)
{
$resource_description_adaptor
->
create_new
(
-
RC_ID
=>
$rc
_id
,
-
RC_ID
=>
$rc
->
dbID
,
-
MEADOW_TYPE
=>
$meadow_type
,
-
PARAMETERS
=>
$xparams
,
);
...
...
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