JobManager View code

A singleton class defining a manager for asyncrhonous jobs.

In reality, this is a simple proxy for methods in the CmsJobManager module.

package

CMS

author

Robert Campbell

copyright

Copyright (c) 2017, Robert Campbell calguy1000@cmsmadesimple.org

since 2.2

Methods

get_instance() : \CMSMS\JobManager

Get the sole permitted instance of this object

static

Response

\CMSMS\JobManager

load_job(integer $job_id) : \CMSMS\Async\Job

Given an integer job id, load the job.

Arguments

integer $job_id

Response

\CMSMS\Async\Job

save_job(\CMSMS\Async\Job &$job) : integer

Save a job to the queue.

Arguments

Response

integer

The id of the job.

delete_job(\CMSMS\Async\Job &$job) 

Remove a job from the queue

Note: After calling this method, the job object itself is invalid and cannot be saved.

Arguments

delete_jobs_by_module(string $module_name) 

Remove all of the jbos originating from a specific module

Arguments

string $module_name