[Koha-bugs] [Bug 23571] Prevent concurrent execution of fines.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Apr 12 15:42:49 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23571

--- Comment #15 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Martin Renvoize from comment #9)
> Comment on attachment 99264 [details] [review]
> Bug 23571: Add flock to fines.pl
> 
> Review of attachment 99264 [details] [review]:
> -----------------------------------------------------------------
> 
> So, this generally looks pretty good to me.. However... I'd love to see the
> locking mechanisms factored out into the Koha::Script base class so we could
> share the common code between command-line scripts and make adding flocking
> elsewhere a simple pattern to follow.
> 
> Would you be willing to have a go at that Agustin?
> 
> ::: misc/cronjobs/fines.pl
> @@ +82,5 @@
> >  cronlogaction();
> >  
> > +my ($lockfile, $LockFH);
> > +foreach (
> > +    '/var/lock/koha',
> 
> How did you come up with these locations?
> 
> I note in the equivalent in rebuild_zebra.pl we use a config variable,
> followed by a fallback order...  I actually like the idea of using
> /var/lock/koha but I'm not sure I understand where if came from?

Take a look at 25109, in which I introduce a centralized place to calculate
this path.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list