The job functions are used to manage jobs assigned to workers. It is most commonly used with the worker interface.
Options for gearman_job_st.
GEARMAN_JOB_ALLOCATED | |
GEARMAN_JOB_ASSIGNED_IN_USE | |
GEARMAN_JOB_WORK_IN_USE | |
GEARMAN_JOB_FINISHED |
Definition at line 288 of file constants.h.
Priority levels for a job.
GEARMAN_JOB_PRIORITY_HIGH | |
GEARMAN_JOB_PRIORITY_NORMAL | |
GEARMAN_JOB_PRIORITY_LOW | |
GEARMAN_JOB_PRIORITY_MAX |
Definition at line 300 of file constants.h.
gearman_return_t gearman_job_send_data | ( | gearman_job_st * | job, | |
const void * | data, | |||
size_t | data_size | |||
) |
Send data for a running job.
gearman_return_t gearman_job_send_warning | ( | gearman_job_st * | job, | |
const void * | warning, | |||
size_t | warning_size | |||
) |
Send warning for a running job.
gearman_return_t gearman_job_send_status | ( | gearman_job_st * | job, | |
uint32_t | numerator, | |||
uint32_t | denominator | |||
) |
Send status information for a running job.
gearman_return_t gearman_job_send_complete | ( | gearman_job_st * | job, | |
const void * | result, | |||
size_t | result_size | |||
) |
Send result and complete status for a job.
gearman_return_t gearman_job_send_exception | ( | gearman_job_st * | job, | |
const void * | exception, | |||
size_t | exception_size | |||
) |
Send exception for a running job.
gearman_return_t gearman_job_send_fail | ( | gearman_job_st * | job | ) |
Send fail status for a job.
char* gearman_job_handle | ( | const gearman_job_st * | job | ) |
Get job handle.
char* gearman_job_function_name | ( | const gearman_job_st * | job | ) |
Get the function name associated with a job.
const char* gearman_job_unique | ( | const gearman_job_st * | job | ) |
Get the unique ID associated with a job.
const void* gearman_job_workload | ( | const gearman_job_st * | job | ) |
Get a pointer to the workload for a job.
size_t gearman_job_workload_size | ( | const gearman_job_st * | job | ) |
Get size of the workload for a job.
void* gearman_job_take_workload | ( | gearman_job_st * | job, | |
size_t * | data_size | |||
) |
Take allocated workload from job. After this, the caller is responsible for free()ing the memory.