Bug 39961 - koha-create doesn't start all queues
Summary: koha-create doesn't start all queues
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 31124
Blocks:
  Show dependency treegraph
 
Reported: 2025-05-21 19:37 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2025-06-06 15:44 UTC (History)
4 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 39961: Make `koha-create` start all queues (1.30 KB, patch)
2025-05-21 19:48 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39961: (follow-up) Make stop all queues (1.10 KB, patch)
2025-05-21 19:48 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39961: (follow-up) Make `koha-disable` stop all queues (1.11 KB, patch)
2025-05-21 19:53 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39961: Make `koha-create` start all queues (1.35 KB, patch)
2025-05-22 06:42 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 39961: (follow-up) Make `koha-disable` stop all queues (1.16 KB, patch)
2025-05-22 06:42 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 39961: Make `koha-create` start all queues (1.44 KB, patch)
2025-06-06 08:03 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 39961: (follow-up) Make `koha-disable` stop all queues (1.26 KB, patch)
2025-06-06 08:03 UTC, Marcel de Rooy
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 (tcohen) 2025-05-21 19:37:38 UTC
To reproduce:
1. Run:
   $ ktd --shell
  k$ sudo koha-create --create-db test
=> FAIL: No mention to `long_tasks`:
```
Koha instance is empty, no staff user created.
Restarting Apache httpd web server: apache2.
Starting Koha worker daemon for test (default):.
Starting Koha indexing daemon for test:.
```
Comment 1 Tomás Cohen Arazi (tcohen) 2025-05-21 19:48:50 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi (tcohen) 2025-05-21 19:48:52 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi (tcohen) 2025-05-21 19:53:24 UTC Comment hidden (obsolete)
Comment 4 Magnus Enger 2025-05-22 06:42:50 UTC
Created attachment 182716 [details] [review]
Bug 39961: Make `koha-create` start all queues

Taking advantage of the `get_worker_queues` function introduced in bug
31124, this patch makes `koha-create` start all defined queues.

To test:
1. Run:
   $ ktd --shell
  k$ sudo -s
  k$ koha-create --create-db test
=> FAIL: No mention of `long_tasks`
2. Apply 31124 and then this patch
3. Run:
  k$ cp debian/scripts/koha-functions.sh \
        /usr/share/koha/bin/koha-functions.sh
  k$ debian/scripts/koha-create --create-db test1
=> SUCCESS: `long_tasks` worker is started
4. Sign off :-D

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 5 Magnus Enger 2025-05-22 06:42:53 UTC
Created attachment 182717 [details] [review]
Bug 39961: (follow-up) Make `koha-disable` stop all queues

This patch applies the same logic to `koha-disable`.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 6 Marcel de Rooy 2025-06-06 08:03:13 UTC
Created attachment 183055 [details] [review]
Bug 39961: Make `koha-create` start all queues

Taking advantage of the `get_worker_queues` function introduced in bug
31124, this patch makes `koha-create` start all defined queues.

To test:
1. Run:
   $ ktd --shell
  k$ sudo -s
  k$ koha-create --create-db test
=> FAIL: No mention of `long_tasks`
2. Apply 31124 and then this patch
3. Run:
  k$ cp debian/scripts/koha-functions.sh \
        /usr/share/koha/bin/koha-functions.sh
  k$ debian/scripts/koha-create --create-db test1
=> SUCCESS: `long_tasks` worker is started
4. Sign off :-D

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Marcel de Rooy 2025-06-06 08:03:16 UTC
Created attachment 183056 [details] [review]
Bug 39961: (follow-up) Make `koha-disable` stop all queues

This patch applies the same logic to `koha-disable`.

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Lucas Gass (lukeg) 2025-06-06 15:44:18 UTC
Nice work everyone!

Pushed to main for 25.11