]> git.koha-community.org Git - koha.git/commit
Bug 37775: Remove delayed commits from update_totalissues.pl and add progress option
authorNick Clemens <nick@bywatersolutions.com>
Fri, 30 Aug 2024 12:47:07 +0000 (12:47 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 21 Oct 2024 12:56:15 +0000 (14:56 +0200)
commiteb2b8d066197573bab0058b3ad28b66c2aa31378
tree232fe0e192b962a03c3edb6d00f021a38f0b8359
parent3c69ec8018f79a3c7eb45bec47999a7ec4efeb43
Bug 37775: Remove delayed commits from update_totalissues.pl and add progress option

This patch removes setting AutoCommit to 0 and commiting only every X records.
Instead we commit as we go and report progress using a parameter.

Bug 36474 reduced the numebr of changes that are being committed, so this should be a reasonable change. The
use of commits without transactions was causing problems if the library was active while the script ran.

To test:
1 - perl misc/cronjobs/update_totalissues.pl -c
2 - Script runs, but with unknown parameter
3 - perl misc/cronjobs/update_totalissues.pl -p 10
4 - Script runs and reports every 10 records
5 - per; misc/cronjobs/update_totalissues.pl
6 - Script runs and reports every 100 records by default

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dba9dd405339691a8671c243518f16cb20f4777f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8fd510cc567ec0dc1a87b6fa4abf8b5e9c208435)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
misc/cronjobs/update_totalissues.pl