Zend Job Queue - PHP API
Table of Contents
- ZendJobQueue - The ZendJobQueue class
- ZendJobQueue::__construct - Creates a ZendJobQueue object connected to a Job Queue daemon.
- ZendJobQueue::createHttpJob - Creates a new URL based job to make the Job Queue Daemon call given $script with given $vars
- ZendJobQueue::getJobStatus - Retrieves status of previously created job identified by $job_id
- ZendJobQueue::removeJob - Removes the job from the queue. Makes all dependent jobs fail. In case the job is in progress it will be finished but dependent jobs won't be started anyway. For non-existing jobs the function just returns false. Finished jobs are simply removed from the database
- ZendJobQueue::restartJob - Restart a previously executed Job and all its followers.
- ZendJobQueue::isSuspended - Checks if Queue is suspended and returns true or false
- ZendJobQueue::isJobQueueDaemonRunning - Checks if the Job Queue Daemon is running
- ZendJobQueue::suspendQueue - Suspends the Job Queue so it will accept new jobs, but won't start them. The jobs which were executed during call to this function will be completed
- ZendJobQueue::resumeQueue - Resumes the Job Queue so it will schedule and start queued jobs.
- ZendJobQueue::getStatistics - Returns internal daemon statistics such as up-time, number of complete jobs, number of failed jobs, number of waiting jobs, number of currently running jobs, etc
- ZendJobQueue::getConfig - Returns the current value of the configuration option of the Job Queue Daemon
- ZendJobQueue::reloadConfig - Re-reads the configuration file of the Job Queue Daemon and reloads all directives that are reloadable
- ZendJobQueue::getJobInfo - Returns an associative array with properties of the job with the given id from the daemon database
- ZendJobQueue::getDependentJobs - Returns a list of associative arrays with the properties of the jobs which depend on the job with the given identifier
- ZendJobQueue::getJobsList - Returns a list of associative arrays with properties of jobs which conform to a given query
- ZendJobQueue::getApplications - Returns an array of application names known by the daemon
- ZendJobQueue::getSchedulingRules - Returns an array of all the registered scheduled rules. Each rule is represented by a nested associative array with the following properties: "id" - The scheduling rule identifier "status" - The rule status (see STATUS_* constants) "type" - The rule type (see TYPE_* constants) "priority" - The priority of the jobs created by this rule "persistent" - The persistence flag of the jobs created by this rule "script" - The URL or script to run "name" - The name of the jobs created by this rule "vars" - The input variables or arguments "http_headers" - The additional HTTP headers "schedule" - The CRON-like schedule command "app_id" - The application name associated with this rule and created jobs "last_run" - The last time the rule was run "next_run" - The next time the rule will run
- ZendJobQueue::getSchedulingRule - Returns an associative array with the properties of the scheduling rule identified by the given argument. The list of the properties is the same as in getSchedulingRule()
- ZendJobQueue::deleteSchedulingRule - Deletes the scheduling rule identified by the given $rule_id and scheduled jobs created by this rule
- ZendJobQueue::suspendSchedulingRule - Suspends the scheduling rule identified by given $rule_id and deletes scheduled jobs created by this rule
- ZendJobQueue::resumeSchedulingRule - Resumes the scheduling rule identified by given $rule_id and creates a corresponding scheduled job
- ZendJobQueue::updateSchedulingRule - Updates and reschedules the existing scheduling rule
- ZendJobQueue::getCurrentJobParams - Decodes an array of input variables passed to the HTTP job
- ZendJobQueue::setCurrentJobStatus - Reports job completion status (OK or FAILED) back to the daemon