[Bug 17159] New: Cron: whats the use of --noemail cleanup_database.pl --mail
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17159 Bug ID: 17159 Summary: Cron: whats the use of --noemail cleanup_database.pl --mail Change sponsored?: --- Product: Koha Version: 3.22 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org We have two lines for cleanup_database in cron. koha-foreach --enabled /usr/share/koha/bin/cronjobs/cleanup_database.pl --sessions --zebraqueue 10 --list-invites koha-foreach --enabled --noemail /usr/share/koha/bin/cronjobs/cleanup_database.pl --mail The second line contains an noemail parameter that seems to be unused. What is it doing there ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17159 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.22 |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17159 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Hm noemail is picked up by koha-list So it says something like: if you did not enable email, call cleanup with mail option. Some kind of contradiction in itself huh? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17159 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17159 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 54831 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54831&action=edit Bug 17159: Do not conditionally run cleanup_database with --mail As a simplification, I propose here to just call cleanup_database in only one line. And not test the mail enabled/disabled flag for the --mail option. If we have no lines to delete, that's just fine and we can go home early :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17159 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |m.de.rooy@rijksmuseum.nl Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17159 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 54832 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54832&action=edit Bug 17159: Add --mail to the cron example file too It was not even there yet. Test plan: Verify if this change looks good. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17159 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |chris@bigballofwax.co.nz --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- Hmm I am not sure this a safe change. The first run cleans up the sessions, and zebraqueue for all enabled instances. The second run deletes rows from the mailqueue for instances that don't have email enabled. We don't want to delete them from the ones that do send email, because then we dont have a record of what notices were sent to people. This will now delete them -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17159 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Chris Cormack from comment #4)
Hmm I am not sure this a safe change.
The first run cleans up the sessions, and zebraqueue for all enabled instances. The second run deletes rows from the mailqueue for instances that don't have email enabled.
We don't want to delete them from the ones that do send email, because then we dont have a record of what notices were sent to people.
This will now delete them
That is the purpose of the job. After a specified number of days (say 30) we are not interested in keeping all those records. And after all, having a record that some notice was produced does not 'prove' that the client actually received it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17159 --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- No, this cron is set up the way it is by design. /cgi-bin/koha/members/notices.pl shows you the notices sent to borrowers. If you change this cron job, I will tell all the librarians who start complaining to me to call you :-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17159 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|Failed QA |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17159 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org