From ea5108f95236e29b45b0f5b7cb529ae9ef92c484 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 4 Jul 2006 19:02:22 +0000 Subject: [PATCH] more spectre tweaks, but no permanent solution to memory leak --- docs/gotcha.txt | 9 +++++++++ lib/Spectre/Admin.pm | 4 ++-- lib/Spectre/Workflow.pm | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 0ade8113f..e219ee4a9 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -7,6 +7,15 @@ upgrading from one version to the next, or even between multiple versions. Be sure to heed the warnings contained herein as they will save you many hours of grief. + +7.0.0 +-------------------------------------------------------------------- + + * There is a memory leak in Spectre. We're working on a solution to + this problem, but in the mean time you will need to restart spectre + every so often to clear out the memory. We recommend setting up a + cron job to restart it once per day. + 6.99.5 -------------------------------------------------------------------- diff --git a/lib/Spectre/Admin.pm b/lib/Spectre/Admin.pm index 855c89892..bd03cdb68 100644 --- a/lib/Spectre/Admin.pm +++ b/lib/Spectre/Admin.pm @@ -152,8 +152,8 @@ sub new { object_states => [ $self => {_start=>"_start", _stop=>"_stop", "shutdown"=>"_stop", "ping"=>"ping"} ], args=>[["shutdown","ping"]] ); - $self->{_workflow} = Spectre::Workflow->new($config, $logger, $debug); - $self->{_cron} = Spectre::Cron->new($config, $logger, $debug); + Spectre::Workflow->new($config, $logger, $debug); + Spectre::Cron->new($config, $logger, $debug); POE::Kernel->run(); } diff --git a/lib/Spectre/Workflow.pm b/lib/Spectre/Workflow.pm index 8f4349b6d..8deae2f5b 100644 --- a/lib/Spectre/Workflow.pm +++ b/lib/Spectre/Workflow.pm @@ -295,7 +295,7 @@ sub new { my $config = shift; my $logger = shift; my $debug = shift; - my $self = {_debug=>$debug, _config=>$config, _logger=>$logger}; + my $self = {_priority1=>[], _priority2=>[], _priority3=>[], _debug=>$debug, _config=>$config, _logger=>$logger}; bless $self, $class; my @publicEvents = qw(addInstance deleteInstance); POE::Session->create(