- Fixed a memory leak in Spectre that could cause it to double in size
roughly every 30 hours under certain conditions.
This commit is contained in:
parent
485393f453
commit
4f91b4bf4e
3 changed files with 9 additions and 5 deletions
|
|
@ -2,6 +2,8 @@
|
||||||
- fix: Add a Related Product not working
|
- fix: Add a Related Product not working
|
||||||
- fix: Edit button missing in timetracker projects
|
- fix: Edit button missing in timetracker projects
|
||||||
- fix: Upgrade from 6.8.10 to 6.99.4 failed
|
- fix: Upgrade from 6.8.10 to 6.99.4 failed
|
||||||
|
- Fixed a memory leak in Spectre that could cause it to double in size
|
||||||
|
roughly every 30 hours under certain conditions.
|
||||||
|
|
||||||
|
|
||||||
6.99.4
|
6.99.4
|
||||||
|
|
|
||||||
|
|
@ -256,6 +256,7 @@ The config file name for the site this job belongs to.
|
||||||
sub deleteJob {
|
sub deleteJob {
|
||||||
my ($self, $params) = @_[OBJECT, ARG0];
|
my ($self, $params) = @_[OBJECT, ARG0];
|
||||||
$self->debug("Deleting schedule ".$params->{taskId}." for ".$params->{config}." from queue.");
|
$self->debug("Deleting schedule ".$params->{taskId}." for ".$params->{config}." from queue.");
|
||||||
|
delete $self->{_errorCount}{$params->{config}}{$params->{taskId}};
|
||||||
delete $self->{_jobs}{$params->{config}}{$params->{taskId}};
|
delete $self->{_jobs}{$params->{config}}{$params->{taskId}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -418,7 +419,7 @@ sub runJobResponse {
|
||||||
}
|
}
|
||||||
my $state = $response->content;
|
my $state = $response->content;
|
||||||
if ($state eq "done") {
|
if ($state eq "done") {
|
||||||
$self->{_errorCount}{$config}{$taskId} = 0;
|
delete $self->{_errorCount}{$config}{$taskId};
|
||||||
$self->debug("Scheduled task $config / $taskId is now complete.");
|
$self->debug("Scheduled task $config / $taskId is now complete.");
|
||||||
if ($job->{runOnce}) {
|
if ($job->{runOnce}) {
|
||||||
$kernel->yield("deleteJob",{config=>$job->{config}, taskId=>$job->{taskId}});
|
$kernel->yield("deleteJob",{config=>$job->{config}, taskId=>$job->{taskId}});
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ use strict;
|
||||||
use HTTP::Request::Common;
|
use HTTP::Request::Common;
|
||||||
use POE;
|
use POE;
|
||||||
use POE::Component::Client::UserAgent;
|
use POE::Component::Client::UserAgent;
|
||||||
|
use WebGUI::Session;
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -189,6 +190,7 @@ sub deleteInstance {
|
||||||
$self->debug("Deleting workflow instance $instanceId from instance queue.");
|
$self->debug("Deleting workflow instance $instanceId from instance queue.");
|
||||||
if ($self->{_instances}{$instanceId}) {
|
if ($self->{_instances}{$instanceId}) {
|
||||||
my $priority = $self->{_instances}{$instanceId}{priority};
|
my $priority = $self->{_instances}{$instanceId}{priority};
|
||||||
|
delete $self->{_errorCount}{$instanceId};
|
||||||
delete $self->{_instances}{$instanceId};
|
delete $self->{_instances}{$instanceId};
|
||||||
for (my $i=0; $i < scalar(@{$self->{"_priority".$priority}}); $i++) {
|
for (my $i=0; $i < scalar(@{$self->{"_priority".$priority}}); $i++) {
|
||||||
if ($self->{"_priority".$priority}[$i] eq $instanceId) {
|
if ($self->{"_priority".$priority}[$i] eq $instanceId) {
|
||||||
|
|
@ -398,19 +400,18 @@ sub workerResponse {
|
||||||
}
|
}
|
||||||
my $state = $response->content;
|
my $state = $response->content;
|
||||||
if ($state eq "waiting") {
|
if ($state eq "waiting") {
|
||||||
$self->{_errorCount}{$instanceId}=0;
|
delete $self->{_errorCount}{$instanceId};
|
||||||
$self->debug("Was told to wait on $instanceId because we're still waiting on some external event.");
|
$self->debug("Was told to wait on $instanceId because we're still waiting on some external event.");
|
||||||
$kernel->yield("suspendInstance",$instanceId);
|
$kernel->yield("suspendInstance",$instanceId);
|
||||||
} elsif ($state eq "complete") {
|
} elsif ($state eq "complete") {
|
||||||
$self->{_errorCount}{$instanceId}=0;
|
delete $self->{_errorCount}{$instanceId};
|
||||||
$self->debug("Workflow instance $instanceId ran one of it's activities successfully.");
|
$self->debug("Workflow instance $instanceId ran one of it's activities successfully.");
|
||||||
$kernel->yield("returnInstanceToQueue",$instanceId);
|
$kernel->yield("returnInstanceToQueue",$instanceId);
|
||||||
} elsif ($state eq "disabled") {
|
} elsif ($state eq "disabled") {
|
||||||
$self->{_errorCount}{$instanceId}=0;
|
delete $self->{_errorCount}{$instanceId};
|
||||||
$self->debug("Workflow instance $instanceId is disabled.");
|
$self->debug("Workflow instance $instanceId is disabled.");
|
||||||
$kernel->yield("suspendInstance",$instanceId);
|
$kernel->yield("suspendInstance",$instanceId);
|
||||||
} elsif ($state eq "done") {
|
} elsif ($state eq "done") {
|
||||||
$self->{_errorCount}{$instanceId}=0;
|
|
||||||
$self->debug("Workflow instance $instanceId is now complete.");
|
$self->debug("Workflow instance $instanceId is now complete.");
|
||||||
$kernel->yield("deleteInstance",$instanceId);
|
$kernel->yield("deleteInstance",$instanceId);
|
||||||
} elsif ($state eq "error") {
|
} elsif ($state eq "error") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue