SproutCMS

This is the code documentation for the SproutCMS project

function start()

Starts a new worker
Workers are run in their own process (using the PHP CLI)

The first argument is the class name
Additional arguments can be provided directly in the function call

Return value is an array with the following keys
  job_id    The ID of the new job
  log_url   URL to view ongoing status and log

Usage

array WorkerCtrl::start ( string $class_name );

Arguments

  1. string $class_name

Exceptions thrown

  • InvalidArgumentException
    The class is not valid
  • QueryException
    The insert of the job details could not be completed
  • WorkerJobException
    If the job failed to start

Return value

  • array
    Job details