GearmanJob
class GearmanJob (View source)
Class: GearmanJob
Methods
Returns the last return code issued by the job server.
Sets the return value for this job, indicates how the job completed.
Sends data to the job server (and any listening clients) for this job.
Sends a warning for this job while it is running.
Sends status information to the job server and any listening clients. Use this to specify what percentage of the job has been completed.
Sends result data and the complete status update for this job.
Sends the supplied exception when this job is running.
Sends failure status for this job, indicating that the job failed in a known way (as opposed to failing due to a thrown exception).
Returns the opaque job handle assigned by the job server.
Returns the function name for this job. This is the function the work will execute to perform the job.
Returns the unique identifiter for this job. The identifier is assigned by the client.
Returns the workload for the job. This is serialized data that is to be processed by the worker.
Returns the size of the job's work load (the data the worker is to process) in bytes.
Details
int
returnCode()
Returns the last return code issued by the job server.
bool
setReturn(int $gearman_return_t)
Sets the return value for this job, indicates how the job completed.
bool
sendData(string $data)
Sends data to the job server (and any listening clients) for this job.
bool
sendWarning(string $warning)
Sends a warning for this job while it is running.
bool
sendStatus(int $numerator, int $denominator)
Sends status information to the job server and any listening clients. Use this to specify what percentage of the job has been completed.
bool
sendComplete(string $result)
Sends result data and the complete status update for this job.
bool
sendException(string $exception)
Sends the supplied exception when this job is running.
bool
sendFail()
Sends failure status for this job, indicating that the job failed in a known way (as opposed to failing due to a thrown exception).
string
handle()
Returns the opaque job handle assigned by the job server.
string
functionName()
Returns the function name for this job. This is the function the work will execute to perform the job.
string
unique()
Returns the unique identifiter for this job. The identifier is assigned by the client.
string
workload()
Returns the workload for the job. This is serialized data that is to be processed by the worker.
int
workloadSize()
Returns the size of the job's work load (the data the worker is to process) in bytes.