From bbc3d40443472024fa822cee6f9d58d42aee7e0f Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 16 Jan 2011 20:20:23 +0000 Subject: [PATCH] internal session db deprecated (or at least on hold), RT#11217 --- FS/FS/cust_svc.pm | 26 ++++++++++++++------------ FS/FS/part_pkg/sesmon_hour.pm | 1 + FS/FS/part_pkg/sesmon_minute.pm | 1 + 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index f5f14ab2b..30e49c598 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -475,18 +475,20 @@ where B is not "svc_acct". =cut -#note: implementation here, POD in FS::svc_acct -sub seconds_since { - my($self, $since) = @_; - my $dbh = dbh; - my $sth = $dbh->prepare(' SELECT SUM(logout-login) FROM session - WHERE svcnum = ? - AND login >= ? - AND logout IS NOT NULL' - ) or die $dbh->errstr; - $sth->execute($self->svcnum, $since) or die $sth->errstr; - $sth->fetchrow_arrayref->[0]; -} +#internal session db deprecated (or at least on hold) +sub seconds_since { 'internal session db deprecated'; }; +##note: implementation here, POD in FS::svc_acct +#sub seconds_since { +# my($self, $since) = @_; +# my $dbh = dbh; +# my $sth = $dbh->prepare(' SELECT SUM(logout-login) FROM session +# WHERE svcnum = ? +# AND login >= ? +# AND logout IS NOT NULL' +# ) or die $dbh->errstr; +# $sth->execute($self->svcnum, $since) or die $sth->errstr; +# $sth->fetchrow_arrayref->[0]; +#} =item seconds_since_sqlradacct TIMESTAMP_START TIMESTAMP_END diff --git a/FS/FS/part_pkg/sesmon_hour.pm b/FS/FS/part_pkg/sesmon_hour.pm index 97274d094..a57b1591a 100644 --- a/FS/FS/part_pkg/sesmon_hour.pm +++ b/FS/FS/part_pkg/sesmon_hour.pm @@ -8,6 +8,7 @@ use FS::part_pkg::flat; @ISA = qw(FS::part_pkg::flat); %info = ( + 'disabled' => 1, #internal session db deprecated (or at least on hold) 'name' => 'Base charge plus charge per-hour from the session monitor', 'shortname' => 'Session monitor (per-hour)', 'inherit_fields' => [ 'global_Mixin' ], diff --git a/FS/FS/part_pkg/sesmon_minute.pm b/FS/FS/part_pkg/sesmon_minute.pm index 9c8dfd1b7..8c9ef03cf 100644 --- a/FS/FS/part_pkg/sesmon_minute.pm +++ b/FS/FS/part_pkg/sesmon_minute.pm @@ -8,6 +8,7 @@ use FS::part_pkg::flat; @ISA = qw(FS::part_pkg::flat); %info = ( + 'disabled' => 1, #internal session db deprecated (or at least on hold) 'name' => 'Base charge plus charge per-minute from the session monitor', 'shortname' => 'Session monitor (per-minute)', 'inherit_fields' => [ 'global_Mixin' ], -- 2.11.0