An external daemon script for executing the batch jobs.

  • codeCoverageIgnore The system test is responsible for testing this class. {@see \Google\Cloud\Tests\System\Core\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( $entrypoint)

Prepare the descriptor spec and install signal handlers.

  • throws RuntimeException
public handleFailure( $idNum, array $items)

Save the items to the failureFile. We silently abandon the items upon
failures in this method because there's nothing we can do.

    public job( $idNum)

    Fetch the child job by id.

    public run()

    A loop for the parent.

    • return void
    public sigHandler( $signo, $siginfo = NULL)

    A signal handler for setting the terminate switch.

    • return void
    private $baseDir
    • var string Base directory for the failure files.
    private $command
    private $descriptorSpec
    private $failureFile
    • var string A filename to save the failed items.
    private static $productionKey = 'P'
    private $runner
    private $shutdown
    private static $typeDirect = 1
    private static $typeFile = 2
    private getFailedFiles()

    Get all the filenames for the failure files.

    • return array Filenames for all the failure files.
    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 initFailureFile()

    Determine the failureFile.

    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 setupSignalHandlers()
    private static $productionKey = 'P'
    private static $typeDirect = 1
    private static $typeFile = 2
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only