A class for executing jobs in batch.

  • experimental The experimental flag means that while we believe this method or class is ready for use, it may change before release in backwards- incompatible ways. Please use with caution, and test thoroughly when upgrading.
public __construct(?Google\Cloud\Core\Batch\ConfigStorageInterface $configStorage = NULL, ?Google\Cloud\Core\Batch\ProcessItemInterface $processor = NULL)
Determine internal implementation and loads the configuration.

    public getJobFromId( $identifier)
    Get the job with the given identifier.

    • return BatchJob|null
    public getJobFromIdNum( $idNum)
    Get the job with the given numeric id.

    • return BatchJob|null
    public getJobs()
    Get all the jobs.

    • return BatchJob[]
    public getProcessor()
    Gets the item processor.

    public loadConfig()
    Load the config from the storage.

    • return bool true on success
    • throws RuntimeException when it fails to load the config.
    public registerJob( $identifier, $func, array $options = [])
    Register a job for batch execution.

    • return bool true on success, false on failure
    • throws InvalidArgumentException When receiving a Closure.
    public submitItem( $identifier, $item)
    Submit an item.

    • return void
    • throws RuntimeException
    private $config
    private $configStorage
    private $processor
    private static $productionKey
    private static $typeDirect
    private static $typeFile
    private getSysvKey( $idNum)
    Create a SystemV IPC key for the given id number.

    Set GOOGLE_CLOUD_SYSV_ID envvar to change the base id.

    • return int
    private isDaemonRunning()
    Returns whether or not the BatchDaemon is running.

    • return bool
    private isSysvIPCLoaded()
    Determine whether the SystemV IPC extension family is loaded.

    • return bool
    private static $productionKey
    private static $typeDirect
    private static $typeFile
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only