It would be convenient to have a script to insert a single bib into the zebra queue manually.
Created attachment 14117 [details] [review] Bug 9286 - Add script to add a bib to the zebra queue from the command line
The new script works well, but I have 2 remarks: 1. 'eXecute' flag is not set 2. if called without arguments, biblio id 0 is added to the zebraqueue. Even if it's managed well by rebuild_zebra.pl, I think this should be prevented and calling mod_zebraqueue.pl without arguments should print the help. Marking as failed qa for (2)
Created attachment 14170 [details] [review] Bug 9286 - Add script to add a bib to the zebra queue from the command line
Good catch!
Works for me, but if we're going to have such a utility, we should cover all of the obvious use cases. In particular, I suggest adding a -a/--authority/--authoritynumber flag. Setting to "in discussion".
Also, even for something as small as this, the GPL verbiage should be added to the header.
Created attachment 15115 [details] [review] Bug 9286 - Add script to add a bib to the zebra queue from the command line
Created attachment 15116 [details] [review] Bug 9286 - Add script to add a bib to the zebra queue from the command line
Two issues with the latest patch: [1] If you run it with just the -a option to index a single authority, it instead prints the help and exists. There's no reason to require that -b be supplied; either -b or -a (or both) is sufficient. [2] Help includes the string "--verbosep", which should just be "--verbose"
Created attachment 15244 [details] [review] Bug 9286 - Add script to add a bib to the zebra queue from the command line
Created attachment 15245 [details] [review] Bug 9286 - Add script to add a bib to the zebra queue from the command line
Created attachment 15504 [details] [review] [SIGNED-OFF] Bug 9286 - Add script to add a bib to the zebra queue from the command line Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: No test plan, but works. Tested adding auth, biblios or both, then rebuilding -z No errors.
misc/mod_zebraqueue.pl -a 1 select * from zebraqueue where done=0; +----+--------------------+---------------+-----------------+------+---------------------+ | id | biblio_auth_number | operation | server | done | time | +----+--------------------+---------------+-----------------+------+---------------------+ | 1 | 1 | specialUpdate | authorityserver | 0 | 2013-05-27 20:07:39 | +----+--------------------+---------------+-----------------+------+---------------------+ misc/mod_zebraqueue.pl -b 1 | 2 | 1 | specialUpdate | biblioserver | 0 | 2013-05-27 20:08:47 |
Created attachment 18409 [details] [review] Bug 9286 - Add script to add a bib to the zebra queue from the command line Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: No test plan, but works. Tested adding auth, biblios or both, then rebuilding -z No errors. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Test Plan 1/ run misc/mod_zebraqueue.pl -a 1 2/ In your koha db SELECT * FROM zebraqueue WHERE done = 0; Check that a row for authority record id 1 has been inserted 3/ run misc/mod_zebraqueue.pl -b 1 4/ In your koha db SELECT * FROM zebraqueue WHERE done = 0; Check that a row for biblio record id 1 has been inserted 5/ run misc/mod_zebraqueue.pl Make sure the help is sensible
Pushed to master. Thanks, Kyle!