<<

API

Methods

list

List run_report background jobs. Optional after and before ISO 8601 query parameters bound the search on enqueued_on.

list_running

List report SQL threads currently executing in MariaDB, regardless of whether they were started in the foreground or by a background worker. Sourced from information_schema.processlist via Koha::Reports->_active_report_runs.

cancel

Cancel a queued run_report background job. Only the librarian who enqueued the job, or a superlibrarian, may cancel it. Only jobs whose status is new can be cancelled.

Internal methods

_render_job

    my $job_data = _render_job( $job, \%reports_by_id, \%patrons_by_id );

Returns the API representation (see the report_job definition) of a run_report background job. The report and patron names are looked up in the given hashrefs, which are keyed by report id and borrowernumber. The saved results id, row count and first error message come from the job's data.

<<