[Koha-bugs] [Bug 5074] New: Adding possibility to cleanup_database.pl to purge only older sessions

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jul 29 14:24:04 CEST 2010


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5074

           Summary: Adding possibility to cleanup_database.pl to purge
                    only older sessions
 Change sponsored?: ---
           Product: Koha
           Version: rel_3_2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Architecture, internals, and plumbing
        AssignedTo: gmcharlt at gmail.com
        ReportedBy: m.de.rooy at rijksmuseum.nl
         QAContact: koha-bugs at lists.koha-community.org
   Estimated Hours: 0.0


Currently, the misc/cronjobs script cleanup_database truncates the session
table (deleting all records, including active sessions).

With an additional parameter sessdays, this behavior could be changed or
(perhaps better) extended. If the parameter sessdays is passed along with a
number of days, the script only deletes older session records. This is
accomplished by examining the values of lasttime, atime or ctime in the record.

So, calling the script like:
  ./cleanup_database.pl -v -sessions -sessdays 7
will only delete sessions records older than 7 days. The "old style" call
  ./cleanup_database.pl -v -sessions
still works too and truncates the table as before. 

Patch has been sent. Can be applied to 3.0.x and master.

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Koha-bugs mailing list