[Rt-commit] r18495 - rt/3.8/trunk/sbin

ruz at bestpractical.com ruz at bestpractical.com
Fri Feb 20 10:56:52 EST 2009


Author: ruz
Date: Fri Feb 20 10:56:51 2009
New Revision: 18495

Modified:
   rt/3.8/trunk/sbin/rt-clean-sessions.in

Log:
* add new option --skip-user
* use over/item/back for options in pod so usage actually outputs them

Modified: rt/3.8/trunk/sbin/rt-clean-sessions.in
==============================================================================
--- rt/3.8/trunk/sbin/rt-clean-sessions.in	(original)
+++ rt/3.8/trunk/sbin/rt-clean-sessions.in	Fri Feb 20 10:56:51 2009
@@ -75,7 +75,7 @@
 
 use Getopt::Long;
 my %opt;
-GetOptions( \%opt, "older=s", "debug", "help");
+GetOptions( \%opt, "older=s", "debug", "help", "skip-user");
 
 
 if ( $opt{help} ) {
@@ -124,7 +124,8 @@
     RT::Interface::Web::Session->ClearOld( $min );
 }
 
-RT::Interface::Web::Session->ClearByUser;
+RT::Interface::Web::Session->ClearByUser
+    unless $opt{'skip-user'};
 
 exit(0);
 
@@ -142,6 +143,7 @@
     rt-clean sessions --debug
     rt-clean sessions --older 10D
     rt-clean sessions --debug --older 1M
+    rt-clean sessions --older 10D --skip-user
 
 =head1 DESCRIPTION
 
@@ -153,7 +155,9 @@
 
 =head1 OPTIONS
 
-=head2 older
+=over 4
+
+=item older
 
 Date interval in the C<< <NUM>[<unit>] >> format. Default unit is D(ays),
 H(our), M(onth) and Y(ear) are also supported.
@@ -161,10 +165,18 @@
 For exmaple: C<rt-clean sessions --older 1M> would delete all sessions that are
 older than 1 month.
 
-=head2 debug
+=item skip-user
+
+By default only one session per user left in the DB, so users that have
+sessions on multiple computers or in different browsers will be logged out.
+Use this option to avoid this.
+
+=item debug
 
 Turn on debug output.
 
+=back
+
 =head1 NOTES
 
 Functionality similar to this is implemented in


More information about the Rt-commit mailing list