[ensembl-dev] How to disable the fork in plugins in the vep script

Duarte Molha Duarte.Molha at ogt.co.uk
Tue Nov 27 13:35:29 GMT 2012



From: dev-bounces at ensembl.org [mailto:dev-bounces at ensembl.org] On Behalf Of Will McLaren
Sent: 27 November 2012 13:31
To: Ensembl developers list
Subject: Re: [ensembl-dev] How to disable the fork in plugins in the vep script

Hi Duarte,

Your new method should contain something like this:

sub new {
    my $class = shift;

    my $self = $class->SUPER::new(@_);

    delete $self->{config}->{fork} if defined($self->{config}->{fork});

    return $self;

Note that this will disable forking globally (i.e. the same as if you had not added --fork on the command line).


On 27 November 2012 13:23, Duarte Molha <Duarte.Molha at ogt.co.uk<mailto:Duarte.Molha at ogt.co.uk>> wrote:
Dear developers

The use of fork seems to crash the script and I would like to test disabling the fork for my plugins.

In your documentation you say:
NB: VEP users writing plugins should be aware that while the VEP code attempts to preserve the state of any plugin-specific cached data between separate forks, there may be situations where data is lost. If you find this is the case, you should disable forking in the new() method of your plugin by deleting the "fork" key from the $config hash.

Can you specify exactly how you would to this?


Duarte Molha

Dev mailing list    Dev at ensembl.org<mailto:Dev at ensembl.org>
Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
Ensembl Blog: http://www.ensembl.info/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20121127/df995191/attachment.html>

More information about the Dev mailing list