summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2011-02-27 19:31:00 +0000
committerivan <ivan>2011-02-27 19:31:00 +0000
commit65a5489102636c5c1351928eed3fa576fbda95bc (patch)
treed83a6921d6b658fdf9552681f48e6a2cea75a428 /FS
parent006ad2592f27a239e7d2c9344f254eabb2b9d1b7 (diff)
add start of torrus srvderive daemon, RT#10574
Diffstat (limited to 'FS')
-rw-r--r--FS/bin/freeside-torrus-srvderive14
1 files changed, 8 insertions, 6 deletions
diff --git a/FS/bin/freeside-torrus-srvderive b/FS/bin/freeside-torrus-srvderive
index f25ba40bc..a3f88aae0 100644
--- a/FS/bin/freeside-torrus-srvderive
+++ b/FS/bin/freeside-torrus-srvderive
@@ -93,14 +93,16 @@ while (1) {
INSERT INTO srvexport ( srv_date, srv_time, serviceid, value, intvl )
VALUES ( ?, ?, ?, ($sum), ? )
";
+ my @param = ( time2str('%Y-%m-%d', $cur), #srv_date
+ time2str('%X', $cur), #srv_time
+ $serviceid,
+ 300, #intvl ...
+ );
+ warn $isql. ' with param '. @param. "\n"
+ if $DEBUG;
my $isth = dbh->prepare($isql) or die $DBI::errstr; #better recovery?
- $isth->execute( time2str('%Y-%m-%d', $cur), #srv_date
- time2str('%X', $cur), #srv_time
- $serviceid,
- 300, #intvl ...
- )
- or die $isth->errstr;
+ $isth->execute( @param )i or die $isth->errstr;
}