[Koha-bugs] [Bug 22417] Delegate background jobs execution

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Apr 9 14:24:23 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22417

--- Comment #40 from David Cook <dcook at prosentient.com.au> ---
Ok I'm finally trying this out! (I should be Netflixing or chilling or
something, but I am really keen to give this a go, especially after a day of
talking about message queues for other projects. Plus I'm always saying we need
to modernize, so I really want to help out Jonathan with all his efforts on
this one, and show that it's not for nothing.)

My steps:

0a. cd ~/git/koha-testing-docker/
0b. sh run.sh (my own script to for invoking docker-compose with a custom file)
1. winpty docker exec -it koha_koha_1 bash
2. cd koha
3. git remote add joubu https://gitlab.com/joubu/Koha.git
4. git fetch joubu
5. git checkout -b rabbitmq joubu/bug_22417

#The following could probably be handled using
https://hub.docker.com/_/rabbitmq
6. apt install rabbitmq-server 
7. rabbitmq-plugins enable rabbitmq_stomp
8. service rabbitmq-server start
9. service rabbitmq-server status

10. apt install libnet-stomp-perl
11. cp debian/scripts/koha-functions.sh /usr/share/koha/bin/koha-functions.sh
12. cp debian/scripts/koha-worker /usr/bin/
13. koha-worker --start kohadev
14. koha-shell kohadev -c installer/data/mysql/updatedatabase.pl
15. restart_all

16. Log into http://localhost:8081/
17. Go to Tools > MARC modification templates
18. Make new template
18b. Name: test
19. Make new action for "test" template
19b. Add new field "856" "u" "https://koha-community.org"
19c. Description: "RabbitMQ test"

20. koha-shell kohadev 
21. perl new_koha_job.pl
Output: [x] Enqueuing BatchUpdateBiblio mmtid=1 with biblionumber=1,2,3
22. exit

23. Go to http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl
24. Confirm that the job has completed

25. Go to http://localhost:8081/cgi-bin/koha/tools/batch_record_modification.pl
26. Enter list of record numbers: 1, 2, 3, 4, 5
27. Select "test" template
28. Click "Continue"
29. Click "Modify selected records"
30. See message "The job has been enqueued! It will be processed as soon as
possible (FIXME - well, it could depend on a config?)"
31. Click "View detail of the enqueued job"
32. Confirm job has status of "finished"
33. Click "Return to the job list" (or "New batch record modification")

Great work, Jonathan! The test works beautifully. I'll take a peek at the code
now to look for some of those FIXME and TODO messages you mention.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list