]> git.koha-community.org Git - koha.git/commit
Bug 27783: Add queue handling in packaging tools
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 4 Apr 2022 18:23:09 +0000 (20:23 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 13 Apr 2022 13:55:40 +0000 (15:55 +0200)
commitf1fef6527c778977bd0d48e2cb42b5c9dc153a8f
tree33c0c7ddd7bc7c10e3e4558060eac071714bf8de
parentdb4baee498f3eab9d44efd00dd82b45e32ed8b29
Bug 27783: Add queue handling in packaging tools

This patch adds queue name handling in is_worker_running and a handy
method to centralize process name handling for queue-specific workers.

To test:
1. Apply this patch
2. Run:
   $ source debian/scripts/koha-functions.sh
   $ get_worker_name kohadev
   kohadev-koha-worker
=> SUCCESS: Default queue means no queue name included
   $ get_worker_name kohadev default
   kohadev-koha-worker
=> SUCCESS: Default queue means no queue name included
   $ get_worker_name kohadev long_tasks
   kohadev-koha-worker-long_tasks
=> SUCCESS: Queue name appended to the name
4. Run:
   $ perl misc4dev/cp_debian_files.pl \
              --koha_dir /kohadevbox/koha \
              --gitify /kohadevbox/gitify \
              --instance kohadev
5. Run:
   $ koha-worker --start --queue oleonard kohadev
=> SUCCESS: Starts!
6. Check:
   $ ps waux | grep oleonard
=> SUCCESS: It is running
7. Play with --stop, --restart, --status and different queue names,
   including 'default' and without the --queue param as well.
=> SUCCESS: All as expected!
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
debian/docs/koha-worker.xml
debian/koha-common.init
debian/scripts/koha-functions.sh
debian/scripts/koha-worker