Bug 30360: Add methods for dealing with the JSON payload
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 4 Apr 2022 22:30:59 +0000 (00:30 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 5 May 2022 15:11:37 +0000 (16:11 +0100)
commitb13b4aaa4fd418c8bd708e513e6daa42d7187825
treefa37b6351961881f756fd81af3d2d2979991012e
parent38fdd82d27f80d8265f97292b3e397f097281b04
Bug 30360: Add methods for dealing with the JSON payload

This patch adds high-level methods to handle the JSON payload
(de)serialization as needed. This allows devs implementing background
jobs to abstract themselves from the internals of the jobs handling.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/BackgroundJob.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/BackgroundJob.pm
t/db_dependent/Koha/BackgroundJob.t