Bug 30692 - Wrong progress displayed for ES indexing tasks
Summary: Wrong progress displayed for ES indexing tasks
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 30360
Blocks:
  Show dependency treegraph
 
Reported: 2022-05-05 14:09 UTC by Tomás Cohen Arazi
Modified: 2022-05-13 17:46 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 30692: Fix progress for ES indexing tasks (1.22 KB, patch)
2022-05-05 14:24 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30692: Fix progress for ES indexing tasks (1.29 KB, patch)
2022-05-05 14:49 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2022-05-05 14:09:44 UTC
Steps to reproduce:

1. Have ES setup
2. Edit a record changing anything on it (title)
3. Save
4. Go to Administration > Background jobs
=> FAIL: The task is 'Finished' but progress is '0/1'
Comment 1 Tomás Cohen Arazi 2022-05-05 14:24:00 UTC
Created attachment 134642 [details] [review]
Bug 30692: Fix progress for ES indexing tasks

This patch makes the ES indexing task record progress properly.

To test:
1. Have ES setup
2. Edit a record making any change that would trigger indexing
3. Go to Administration > Background jobs
=> FAIL: The task status is 'Finished' but progress shows '0/1'.
4. Apply this patch
5. Restart the default worker:
   $ koha-worker --restart kohadev
6. Repeat 2 and 3
=> SUCCESS: Things work the same, but progress is '1/1'
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Martin Renvoize 2022-05-05 14:49:08 UTC
Created attachment 134646 [details] [review]
Bug 30692: Fix progress for ES indexing tasks

This patch makes the ES indexing task record progress properly.

To test:
1. Have ES setup
2. Edit a record making any change that would trigger indexing
3. Go to Administration > Background jobs
=> FAIL: The task status is 'Finished' but progress shows '0/1'.
4. Apply this patch
5. Restart the default worker:
   $ koha-worker --restart kohadev
6. Repeat 2 and 3
=> SUCCESS: Things work the same, but progress is '1/1'
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2022-05-05 14:49:26 UTC
Trivial and correct.. PQA
Comment 4 Martin Renvoize 2022-05-05 15:12:21 UTC
Pushed for 22.05, thanks to everyone involved :)