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
41953ab2
Commit
41953ab2
authored
Jul 15, 2011
by
Leo Gordon
Browse files
more flexible approach: allows to add triggers later by simply by sourcing the triggers file
parent
c95e0fa9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
4 deletions
+7
-4
modules/Bio/EnsEMBL/Hive/DBSQL/DBAdaptor.pm
modules/Bio/EnsEMBL/Hive/DBSQL/DBAdaptor.pm
+2
-2
modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm
modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm
+0
-2
sql/triggers.mysql
sql/triggers.mysql
+3
-0
sql/triggers.sqlite
sql/triggers.sqlite
+2
-0
No files found.
modules/Bio/EnsEMBL/Hive/DBSQL/DBAdaptor.pm
View file @
41953ab2
...
...
@@ -44,8 +44,8 @@ sub hive_use_triggers { # getter only, not setter
my
$self
=
shift
@_
;
unless
(
defined
(
$self
->
{'
_hive_use_triggers
'})
)
{
my
$arrRef
=
$self
->
get_MetaContainer
->
list_value_by_key
(
'
hive_use_triggers
'
);
$self
->
{'
_hive_use_triggers
'}
=
@$arrRef
?
$arrRef
->
[
0
]
:
0
;
my
(
$hive_use_triggers
)
=
@
{
$self
->
get_MetaContainer
->
list_value_by_key
(
'
hive_use_triggers
'
)
}
;
$self
->
{'
_hive_use_triggers
'}
=
$hive_use_triggers
||
0
;
}
return
$self
->
{'
_hive_use_triggers
'};
}
...
...
modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm
View file @
41953ab2
...
...
@@ -314,8 +314,6 @@ sub run {
warn
"
Loading pipeline-wide parameters ...
\n
";
my
$pipeline_wide_parameters
=
$self
->
pipeline_wide_parameters
;
$pipeline_wide_parameters
->
{'
hive_use_triggers
'}
=
$self
->
{'
_extra_options
'}{'
hive_use_triggers
'}
||
0
;
# pass it into the database
while
(
my
(
$meta_key
,
$meta_value
)
=
each
%$pipeline_wide_parameters
)
{
if
(
$analysis_topup
)
{
$meta_container
->
delete_key
(
$meta_key
);
...
...
sql/triggers.mysql
View file @
41953ab2
...
...
@@ -26,3 +26,6 @@ FOR EACH ROW
failed_job_count = failed_job_count + (CASE NEW.status WHEN 'FAILED' THEN 1 ELSE 0 END)
WHERE analysis_id = NEW.analysis_id;
# inform the runtime part of the system that triggers are in place:
INSERT INTO meta (meta_key, meta_value) VALUES ('hive_use_triggers', '1');
sql/triggers.sqlite
View file @
41953ab2
...
...
@@ -32,3 +32,5 @@ BEGIN
WHERE analysis_id = NEW.analysis_id;
END;
# inform the runtime part of the system that triggers are in place:
INSERT INTO meta (meta_key, meta_value) VALUES ('hive_use_triggers', '1');
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