The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Gearman::JobScheduler - Gearman utilities.

(static) job_status($function_name, $gearman_job_id[, $config])

Get Gearman job status.

Parameters:

  • Gearman function name (e.g. "NinetyNineBottlesOfBeer")

  • Gearman job ID (e.g. "H:localhost.localdomain:8")

  • (optional) Instance of Gearman::JobScheduler::Configuration

Returns hashref with the job status, e.g.:

Returns undef if the job ID was not found; dies on error.

(static) cancel_gearman_job($function_name, $gearman_job_id[, $config])

(Attempt to) cancel a Gearman job.

(None: the job has to be queued and not running.)

Parameters:

  • Gearman function name (e.g. "NinetyNineBottlesOfBeer")

  • Gearman job ID (e.g. "H:localhost.localdomain:8")

  • (optional) Instance of Gearman::JobScheduler::Configuration

Returns 1 if cancelling was successful, 0 otherwise.

die()s on error.

(static) log_path_for_gearman_job($function_name, $gearman_job_handle[, $config])

Get a path to where Gearman expects to save the job's log.

(Warning: the job has to running; if not, this subroutine will complain and die.)

Parameters:

  • Gearman function name (e.g. "NinetyNineBottlesOfBeer")

  • Gearman job ID (e.g. "H:localhost.localdomain:8")

  • (optional) Instance of Gearman::JobScheduler::Configuration

Returns log path where the job's log is being written, e.g. "/var/log/gjs/NinetyNineBottlesOfBeer/H_tundra.local_93.NinetyNineBottlesOfBeer().log"

die()s on error.