Bugzilla – Attachment 99265 Details for
Bug 23571
Add measures to prevent concurrent execution of fines.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23571: (follow-up) Only look for overdues after obtaining the lock
Bug-23571-follow-up-Only-look-for-overdues-after-o.patch (text/plain), 1.18 KB, created by
Martin Renvoize (ashimema)
on 2020-02-19 16:57:48 UTC
(
hide
)
Description:
Bug 23571: (follow-up) Only look for overdues after obtaining the lock
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-02-19 16:57:48 UTC
Size:
1.18 KB
patch
obsolete
>From 574e369a5a52e9b388972e439a21efe53cf59972 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 19 Feb 2020 16:56:22 +0000 >Subject: [PATCH] Bug 23571: (follow-up) Only look for overdues after obtaining > the lock > >No point in performing the overdues fetch before obtaining the lock and >knowing we can do something with them. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > misc/cronjobs/fines.pl | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/misc/cronjobs/fines.pl b/misc/cronjobs/fines.pl >index 2505e2f3a0..c543a17b47 100755 >--- a/misc/cronjobs/fines.pl >+++ b/misc/cronjobs/fines.pl >@@ -123,11 +123,12 @@ if ($filename) { > print {$fh} join $delim, ( @borrower_fields, @item_fields, @other_fields ); > print {$fh} "\n"; > } >-my $counted = 0; >-my $params; >-$params->{maximumdays} = $maxdays if $maxdays; >-my $overdues = Getoverdues($params); >+ > if(_flock($LockFH, LOCK_EX|LOCK_NB)) { >+ my $counted = 0; >+ my $params; >+ $params->{maximumdays} = $maxdays if $maxdays; >+ my $overdues = Getoverdues($params); > for my $overdue ( @{$overdues} ) { > next if $overdue->{itemlost}; > >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23571
:
96055
|
96056
|
98898
|
98899
|
99263
|
99264
|
99265
|
102772
|
102804
|
102821
|
102844
|
102888
|
102910
|
102911
|
102912