Bugzilla – Attachment 171199 Details for
Bug 37552
Automatic renewals cronjob can die when an item scheduled for renewal is checked in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37552: (24.05.x) Wrap auto renewal attempt in eval to ensure script does not die
Bug-37552-2405x-Wrap-auto-renewal-attempt-in-eval-.patch (text/plain), 1.22 KB, created by
Lucas Gass (lukeg)
on 2024-09-09 13:48:06 UTC
(
hide
)
Description:
Bug 37552: (24.05.x) Wrap auto renewal attempt in eval to ensure script does not die
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-09-09 13:48:06 UTC
Size:
1.22 KB
patch
obsolete
>From c83a3fabb7e4c570ee3c9b2d1492a760428b883c Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 9 Sep 2024 13:47:40 +0000 >Subject: [PATCH] Bug 37552: (24.05.x) Wrap auto renewal attempt in eval to > ensure script does not die > >--- > misc/cronjobs/automatic_renewals.pl | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/automatic_renewals.pl b/misc/cronjobs/automatic_renewals.pl >index 30d8e946930..3b46c937146 100755 >--- a/misc/cronjobs/automatic_renewals.pl >+++ b/misc/cronjobs/automatic_renewals.pl >@@ -170,7 +170,13 @@ while ( my $auto_renew = $auto_renews->next ) { > $wants_digest = 0; > } > >- my ( $success, $error, $updated ) = $auto_renew->attempt_auto_renew( { confirm => $confirm } ); >+ my ( $success, $error, $updated ); >+ eval { ( $success, $error, $updated ) = $auto_renew->attempt_auto_renew( { confirm => $confirm } ); }; >+ if ($@) { >+ print "An error was encountered in processing auto renewal for issue id: " . $auto_renew->issue_id . "\n"; >+ print "$@ \n"; >+ next; >+ } > if ($success) { > if ($verbose) { > say sprintf "Issue id: %s for borrower: %s and item: %s %s be renewed.", >-- >2.39.2
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 37552
:
169966
|
170043
|
170320
| 171199