Bugzilla – Attachment 136497 Details for
Bug 29325
commit_file.pl error 'Already in a transaction'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29325: (QA follow-up) Tidy up
Bug-29325-QA-follow-up-Tidy-up.patch (text/plain), 3.02 KB, created by
Marcel de Rooy
on 2022-06-24 13:36:10 UTC
(
hide
)
Description:
Bug 29325: (QA follow-up) Tidy up
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-06-24 13:36:10 UTC
Size:
3.02 KB
patch
obsolete
>From 02389f056904b8403061da1e906c8ae735ce6751 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 24 Jun 2022 09:31:51 +0000 >Subject: [PATCH] Bug 29325: (QA follow-up) Tidy up >Content-Type: text/plain; charset=utf-8 > >tools/manage-marc-import.pl: sub commit_batch does no longer need $schema >tools/manage-marc-import.pl: sub revert_batch: calling BatchRevertRecords which has no interval and callback >misc/commit_file.pl: sub print_progress_and_commit does no longer commit, renamed >misc/commit_file.pl: sub print_progress does no longer have a schema parameter >misc/commit_file.pl: sub revert_batch reported deleted items as added > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/commit_file.pl | 8 ++++---- > tools/manage-marc-import.pl | 5 +---- > 2 files changed, 5 insertions(+), 8 deletions(-) > >diff --git a/misc/commit_file.pl b/misc/commit_file.pl >index da504d2a3a..d18dda68c4 100755 >--- a/misc/commit_file.pl >+++ b/misc/commit_file.pl >@@ -83,7 +83,7 @@ sub process_batch { > > print "... importing MARC records -- please wait\n"; > my ($num_added, $num_updated, $num_items_added, $num_items_replaced, $num_items_errored, $num_ignored) = >- BatchCommitRecords($import_batch_id, $framework, 100, \&print_progress_and_commit); >+ BatchCommitRecords($import_batch_id, $framework, 100, \&print_progress); > print "... finished importing MARC records\n"; > > print <<_SUMMARY_; >@@ -120,14 +120,14 @@ Number of records deleted: $num_deleted > Number of errors: $num_errors > Number of records reverted: $num_reverted > Number of records ignored: $num_ignored >-Number of items added: $num_items_deleted >+Number of items deleted: $num_items_deleted > > _SUMMARY_ > } > > >-sub print_progress_and_commit { >- my ( $recs, $schema ) = @_; >+sub print_progress { >+ my ( $recs ) = @_; > print "... processed $recs records\n"; > } > >diff --git a/tools/manage-marc-import.pl b/tools/manage-marc-import.pl >index f74db44358..9ee6917be4 100755 >--- a/tools/manage-marc-import.pl >+++ b/tools/manage-marc-import.pl >@@ -234,7 +234,6 @@ sub commit_batch { > my $job = undef; > my ( $num_added, $num_updated, $num_items_added, > $num_items_replaced, $num_items_errored, $num_ignored ); >- my $schema = Koha::Database->new->schema; > my $callback = sub { }; > if ($runinbackground) { > $job = put_in_background($import_batch_id); >@@ -274,15 +273,13 @@ sub revert_batch { > my $schema = Koha::Database->new->schema; > $schema->txn_do( > sub { >- my $callback = sub { }; > if ($runinbackground) { > $job = put_in_background($import_batch_id); >- $callback = progress_callback( $job ); > } > ( > $num_deleted, $num_errors, $num_reverted, > $num_items_deleted, $num_ignored >- ) = BatchRevertRecords( $import_batch_id, 50, $callback ); >+ ) = BatchRevertRecords( $import_batch_id ); > } > ); > >-- >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 29325
:
126944
|
127489
|
128033
|
135556
|
135557
|
135558
|
135559
|
135560
|
136390
|
136391
|
136392
|
136393
|
136394
|
136398
|
136399
|
136400
|
136401
|
136402
|
136478
|
136479
|
136480
|
136481
|
136482
|
136496
| 136497 |
136531
|
136803