Skip to content

Commit

Permalink
Moving request to the backupdb
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianAker committed Dec 17, 2002
1 parent 4bc3902 commit a5b9896
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/Admin/admin.pl
Expand Up @@ -1697,6 +1697,9 @@ sub displayRecentRequests {
my $admindb = getObject("Slash::Admin",
$constants->{backup_db_user} || $constants->{log_db_user});

my $backupdb = getObject("Slash::DB",
$constants->{backup_db_user} || $constants->{log_db_user});

# Note, limit the id passed in by making sure we don't try to do a
# select on more than 500,000 rows. This is an arbitrary number,
# but the intent is to keep from locking up the DB too much.
Expand All @@ -1706,7 +1709,7 @@ sub displayRecentRequests {
$min_id = $max_id + $min_id if $min_id < 0;
$min_id = $max_id if $min_id < $max_id - 500_000;

my $min_id_ts ||= $slashdb->getAccesslog($min_id, 'ts');
my $min_id_ts ||= $backupdb->getAccesslog($min_id, 'ts');

my $options = { min_id => $min_id };
$options->{thresh_count} = defined($form->{thresh_count}) ? $form->{thresh_count} : 100;
Expand Down

0 comments on commit a5b9896

Please sign in to comment.