# RT_External installations should have their own cron scripts for this
my $system = $FS::TicketSystem::system;
- return if $system ne 'RT_Internal';
+ return if !defined($system) || $system ne 'RT_Internal';
+
+ system('/opt/rt3/sbin/rt-fulltext-indexer --quiet --limit 5400 &');
- FS::TicketSystem->init;
- $DEBUG = 1 if $opt{'v'};
- RT::Config->Set( LogToScreen => 'debug' ) if $DEBUG;
-
# if -d or -y is in use, bail out. There's no reliable way to tell RT
# to use an alternate system time.
if ( $opt{'d'} or $opt{'y'} ) {
return;
}
+ FS::TicketSystem->init;
my $session = FS::TicketSystem->session();
my $CurrentUser = $session->{'CurrentUser'}
or die "Failed to create RT session";
+ $DEBUG = 1 if $opt{'v'};
+ RT::Config->Set( LogToScreen => 'debug' ) if $DEBUG;
+
# load some modules that aren't handled in FS::TicketSystem
foreach (qw(
Search::ActiveTicketsInQueue
$queues->UnLimit;
while (my $queue = $queues->Next) {
warn "Queue '".$queue->Name."'\n" if $DEBUG;
- my $CurrentUser = $queue->CurrentUser;
my %opt = @_;
my $tickets = RT::Tickets->new($CurrentUser);
my $search = RT::Search::ActiveTicketsInQueue->new(