Bug 32394: (follow-up) Add param for Koha::BackgroundJob::StageMARCForImport->enqueue

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomas Cohen Arazi 2022-12-16 09:00:45 -03:00
parent 42d60ad850
commit 3dcdd6db78
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 2 additions and 1 deletions

View File

@ -196,6 +196,7 @@ Enqueue the new job
sub enqueue {
my ( $self, $args) = @_;
# FIXME: no $args validation
$self->SUPER::enqueue({
job_size => 0, # TODO Unknown for now?
job_args => $args,

View File

@ -35,7 +35,7 @@ subtest 'enqueue() tests' => sub {
$schema->storage->txn_begin;
my $job_id = Koha::BackgroundJob::StageMARCForImport->new->enqueue();
my $job_id = Koha::BackgroundJob::StageMARCForImport->new->enqueue({});
my $job = Koha::BackgroundJobs->find($job_id)->_derived_class;
is( $job->size, 0, 'Size is correct' );