* Tools/SOGoToolExpireUserSessions.m:
semi-colon are useless in sql queries and probably breaks on oracle Monotone-Parent: e699f14b51f9de020728f6ca36fdcc283587d057 Monotone-Revision: aadc4759a64f724760d38bbdfd92715182856439 Monotone-Author: jraby@inverse.ca Monotone-Date: 2012-06-21T15:51:53maint-2.0.2
parent
58d115817b
commit
86b689d7e8
|
@ -109,7 +109,7 @@
|
||||||
return rc=NO;
|
return rc=NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
sql = [NSString stringWithFormat: @"SELECT count(*) FROM %@ WHERE c_lastseen <= %d;",
|
sql = [NSString stringWithFormat: @"SELECT count(*) FROM %@ WHERE c_lastseen <= %d",
|
||||||
[tableURL gcsTableName], oldest];
|
[tableURL gcsTableName], oldest];
|
||||||
ex = [channel evaluateExpressionX: sql];
|
ex = [channel evaluateExpressionX: sql];
|
||||||
if (ex)
|
if (ex)
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
if (verbose)
|
if (verbose)
|
||||||
NSLog(@"Will be removing %d sessions", sessionsToDelete);
|
NSLog(@"Will be removing %d sessions", sessionsToDelete);
|
||||||
[channel cancelFetch];
|
[channel cancelFetch];
|
||||||
sql = [NSString stringWithFormat: @"DELETE FROM %@ WHERE c_lastseen <= %d;",
|
sql = [NSString stringWithFormat: @"DELETE FROM %@ WHERE c_lastseen <= %d",
|
||||||
[tableURL gcsTableName], oldest];
|
[tableURL gcsTableName], oldest];
|
||||||
if (verbose)
|
if (verbose)
|
||||||
NSLog(@"Removing sessions older than %d minute(s)", nbMinutes);
|
NSLog(@"Removing sessions older than %d minute(s)", nbMinutes);
|
||||||
|
|
Loading…
Reference in New Issue