projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
006ad25
)
add start of torrus srvderive daemon, RT#10574
author
ivan
<ivan>
Sun, 27 Feb 2011 19:31:00 +0000
(19:31 +0000)
committer
ivan
<ivan>
Sun, 27 Feb 2011 19:31:00 +0000
(19:31 +0000)
FS/bin/freeside-torrus-srvderive
patch
|
blob
|
history
diff --git
a/FS/bin/freeside-torrus-srvderive
b/FS/bin/freeside-torrus-srvderive
index
f25ba40
..
a3f88aa
100644
(file)
--- 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), ? )
";
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?
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;
}
}