Bug 27783: Replace --job-type by --queue
authorJulian Maurice <julian.maurice@biblibre.com>
Wed, 30 Mar 2022 12:21:50 +0000 (14:21 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 13 Apr 2022 13:55:40 +0000 (15:55 +0200)
commit9acb599d16764a813f5481164cdaeec3b3d01f27
tree7d2d897def65057891cb20815dba9447e72c0652
parenta42717ad15bbbb772b7477ab374c75d1039350f9
Bug 27783: Replace --job-type by --queue

This patch adds a new column background_jobs.queue, which default to
'default'
By default, new jobs are enqueued into this default queue, and the
background job worker will subscribe to the default queue unless told
otherwise by the --job-queue option

The new job UpdateElasticIndex is automatically enqueued in another
queue named 'index'
So you can have 'default' worker with
    misc/background_jobs_worker.pl
and a dedicated indexing worker with
    misc/background_jobs_worker.pl --queue index

This is to address bug 27344 comment #15

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
Koha/BackgroundJob.pm
misc/background_jobs_worker.pl