Module to encapsulate all db access for persistent class Role.
There should be just one per application and database connection.
=head1 LICENSE
Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
=head1 CONTACT
Please subscribe to the Hive mailing list: http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users to discuss Hive-related questions or to be notified of our updates
Role is a state of a Worker while performing jobs of a particular Analysis.
=head1 LICENSE
Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
=head1 CONTACT
Please subscribe to the Hive mailing list: http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users to discuss Hive-related questions or to be notified of our updates
=head1 APPENDIX
The rest of the documentation details each of the object methods.
$self->adaptor->db->get_AnalysisStatsAdaptor->decrease_running_workers($self->analysis->dbID);# FIXME: tidy up this counting of active roles
$self->adaptor->db->get_AnalysisStatsAdaptor->decrease_running_workers($self->current_role->analysis->dbID);# FIXME: tidy up this counting of active roles
my$max_retry_count=$self->analysis->max_retry_count();# a constant (as the Worker is already specialized by the Queen) needed later for retrying jobs
my$max_retry_count=$current_role->analysis->max_retry_count();# a constant (as the Worker is already specialized by the Queen) needed later for retrying jobs