Bugzilla – Attachment 135934 Details for
Bug 30889
Background jobs lead to wrong/missing info in logs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30889: (follow-up) Add context field to background_jobs
Bug-30889-follow-up-Add-context-field-to-backgroun.patch (text/plain), 1.96 KB, created by
Martin Renvoize (ashimema)
on 2022-06-10 13:24:04 UTC
(
hide
)
Description:
Bug 30889: (follow-up) Add context field to background_jobs
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-06-10 13:24:04 UTC
Size:
1.96 KB
patch
obsolete
>From a5476ec437c77600182d1875da63f4f810718730 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 10 Jun 2022 14:06:22 +0100 >Subject: [PATCH] Bug 30889: (follow-up) Add context field to background_jobs > >This patch adds a new 'context' field to the background_jobs table to >record the context in which the job was queued. >--- > installer/data/mysql/atomicupdate/bug_30889.pl | 15 +++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 2 files changed, 16 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_30889.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_30889.pl b/installer/data/mysql/atomicupdate/bug_30889.pl >new file mode 100644 >index 0000000000..d58a352f9c >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_30889.pl >@@ -0,0 +1,15 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "30889", >+ description => "Add context to background_jobs", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ unless( column_exists( 'background_jobs', 'context') ) { >+ $dbh->do(q{ ALTER TABLE background_jobs ADD `context` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL AFTER `data` }); >+ say $out "field added"; >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 51b6241c07..92d8dbcbc2 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -984,6 +984,7 @@ CREATE TABLE `background_jobs` ( > `type` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL, > `queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default' COMMENT 'Name of the queue the job is sent to', > `data` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, >+ `context` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, > `enqueued_on` datetime DEFAULT NULL, > `started_on` datetime DEFAULT NULL, > `ended_on` datetime DEFAULT NULL, >-- >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 30889
:
135759
|
135760
|
135932
|
135933
|
135934
|
135935
|
135936
|
136294
|
136295
|
136296
|
136297
|
136298
|
136299
|
136375
|
136376
|
136784
|
136785
|
136786
|
136787
|
136788
|
136789
|
136790
|
136791
|
136792
|
136904
|
136948