koha-zebra has a nice, informative --status switch, koha-indexer
does not. This patch adds it.
To test:
- Run "sudo koha-indexer --status kohadev" - you get an error:
"Error: invalid option switch (--status)"
- Apply this patch
- If you are on e.g. kohadevbox you need to copy koha-indexer to
where it is actually run from:
sudo cp debian/scripts/koha-indexer /usr/sbin/koha-indexer
- Run "sudo koha-indexer --status kohadev" again and you should
get a nice status telling if the indexer is running or not
- Toggle the indexer on and off with koha-indexer --start/--stop
and verify the status is telling the truth about the state of
the indexer
- Run "sudo koha-indexer --help" and check there is a description
of the --status option
- Have a look at debian/docs/koha-indexer.xml and verify there is
an adequate description of the --status option.
- Run "prove -v xt/verify-debian-docbook.t" to check the structure
of the man page in DocBook format.
PS: I tried to generate a manpage from the DocBook as described at
https://wiki.koha-community.org/wiki/Testing_man_pages
but the output did not look good for any of our DocBook files.
Not sure why.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Short:
Launch an indexing daemon (rebuild_zebra.pl -daemon) process for each
enabled instance. Enabling/disabling the use of the indexer is handled
by global configuration variables in /etc/default/koha-common.
Also provides command line tools to manage the running indexer daemons
for your instances.
Long:
Using an indexing daemon avoids launching a new interpreter each time
the cron triggers the indexing, and also allows sub-minute incremental
reindexing, a requirement from our librarians.[1]
Using the indexer daemon could remain "experimental" until it gets more
testing; so is disabled by default initially. To enable the use of the
indexer the user has to tweak the /etc/default/koha-common config file.
Specifically the USE_INDEXER_DAEMON variable, which is clearly explained
in the file.
Frecquency defaults to 5 sec, and can be changed by tweaking the
/etc/default/koha-common config file too.
This patch uses rebuild_zebra.pl in daemon mode, but it is crafted to
allow changing the indexing daemon and passing specific option switches
it might need.
Regards
To+
[1] This is the .deb version of http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8519
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>