[freeside-commits] freeside/FS/bin freeside-torrus-srvderive, 1.5, 1.6
Ivan,,,
ivan at wavetail.420.am
Sat Feb 26 19:26:59 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv2293/FS/bin
Modified Files:
freeside-torrus-srvderive
Log Message:
add start of torrus srvderive daemon, RT#10574
Index: freeside-torrus-srvderive
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-torrus-srvderive,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- freeside-torrus-srvderive 27 Feb 2011 03:15:44 -0000 1.5
+++ freeside-torrus-srvderive 27 Feb 2011 03:26:57 -0000 1.6
@@ -39,11 +39,14 @@
$other_date = "CAST( $other_date AS TIMESTAMP )" if driver_name =~ /^Pg/i;
$other_date = str2time_sql. $other_date. str2time_sql_closing;
+my $in = concat_sql([ '?', "'_IN'" )
+my $out = concat_sql([ '?', "'_OUT'" )
+
my $sql = "
SELECT DISTINCT srv_date, srv_time FROM srvexport
WHERE NOT EXISTS (
SELECT 1 FROM srvexport AS other
- WHERE other.serviceid IN ( ?||'_IN', ?||'_OUT')
+ WHERE other.serviceid IN ( $in, $out )
AND ABS( $_date - $other_date ) <= 60
)
ORDER BY id
More information about the freeside-commits
mailing list