diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-08-13 13:00:41 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-08-13 13:00:41 -0700 |
commit | 43a3bfc79a80263967e5cba41ddbc72cec9c1e97 (patch) | |
tree | 31d50f862cc574d1696bbd1a85829a88f6e27b86 /htetc | |
parent | db80d13447786bc554d40d4817a1b0d7a5b5e09f (diff) |
should fix intermittant slowness, RT#18719
Diffstat (limited to 'htetc')
-rw-r--r-- | htetc/handler.pl | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/htetc/handler.pl b/htetc/handler.pl index 2e6fbe586..d7c56572c 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -7,6 +7,14 @@ use warnings; use FS::Mason qw( mason_interps ); use FS::Trace; +if ( %%%RT_ENABLED%%% ) { + require RT; + $> = scalar(getpwnam('freeside')); + RT::LoadConfig(); + RT::Init(); + $> = $<; +} + #use vars qw($r); # Bring in ApacheHandler, necessary for mod_perl integration. @@ -151,19 +159,10 @@ sub handler $status; } -my $rt_initialized = 0; - sub my_rt_init { return unless $RT::VERSION; - - if ( $rt_initialized ) { - RT::ConnectToDatabase(); - RT::InitSignalHandlers(); - } else { - RT::LoadConfig(); - RT::Init(); - $rt_initialized++; - } + RT::ConnectToDatabase(); + RT::InitSignalHandlers(); } 1; |