Omeka_Job_Process_Dispatcher¶
Package: Job\Process
- class Omeka_Job_Process_Dispatcher¶
Spawns and manages background processes.
- startProcess($className, $user = null, $args = null)¶
Create a table entry for a new background process and spawn it.
Parameters: - $className (string) – Omeka_Job_Process_AbstractProcess subclass name to spawn
- $user (User) – User to run process as, defaults to current user
- $args (Array|null) – Arguments specific to the child class process
Returns: Process The model object for the background process
- stopProcess(Process $process)¶
Stops a background process in progress.
Parameters: - $process (Process) – The process to stop.
Returns: bool True if the process was stopped, false if not.
- getPHPCliPath()¶
- _checkCliPath($cliPath)¶
Checks if the configured PHP-CLI path points to a valid PHP binary. Flash an appropriate error if the path is invalid.
Parameters: - $cliPath –
- _autodetectCliPath()¶
- _getBootstrapFilePath()¶
Returns the path to the background bootstrap script.
Returns: string Path to bootstrap
- _fork($command)¶
Launch a background process, returning control to the foreground.
Parameters: - $command –