Data Structures |
struct | gearman_job_st |
Modules |
| Private Job Functions |
Enumerations |
enum | gearman_job_options_t { GEARMAN_JOB_ALLOCATED = (1 << 0),
GEARMAN_JOB_ASSIGNED_IN_USE = (1 << 1),
GEARMAN_JOB_WORK_IN_USE = (1 << 2),
GEARMAN_JOB_FINISHED = (1 << 3)
} |
enum | gearman_job_priority_t { GEARMAN_JOB_PRIORITY_HIGH,
GEARMAN_JOB_PRIORITY_NORMAL,
GEARMAN_JOB_PRIORITY_LOW,
GEARMAN_JOB_PRIORITY_MAX
} |
Functions |
gearman_return_t | gearman_job_send_data (gearman_job_st *job, const void *data, size_t data_size) |
gearman_return_t | gearman_job_send_warning (gearman_job_st *job, const void *warning, size_t warning_size) |
gearman_return_t | gearman_job_send_status (gearman_job_st *job, uint32_t numerator, uint32_t denominator) |
gearman_return_t | gearman_job_send_complete (gearman_job_st *job, const void *result, size_t result_size) |
gearman_return_t | gearman_job_send_exception (gearman_job_st *job, const void *exception, size_t exception_size) |
gearman_return_t | gearman_job_send_fail (gearman_job_st *job) |
char * | gearman_job_handle (const gearman_job_st *job) |
char * | gearman_job_function_name (const gearman_job_st *job) |
const char * | gearman_job_unique (const gearman_job_st *job) |
const void * | gearman_job_workload (const gearman_job_st *job) |
size_t | gearman_job_workload_size (const gearman_job_st *job) |
void * | gearman_job_take_workload (gearman_job_st *job, size_t *data_size) |
Detailed Description
The job functions are used to manage jobs assigned to workers. It is most commonly used with the worker interface.
Enumeration Type Documentation
Options for gearman_job_st.
- Enumerator:
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.
- Enumerator:
GEARMAN_JOB_PRIORITY_HIGH |
|
GEARMAN_JOB_PRIORITY_NORMAL |
|
GEARMAN_JOB_PRIORITY_LOW |
|
GEARMAN_JOB_PRIORITY_MAX |
|
Definition at line 300 of file constants.h.
Function Documentation
Send data for a running job.
Definition at line 37 of file job.c.
Send warning for a running job.
Definition at line 57 of file job.c.
Send status information for a running job.
Definition at line 78 of file job.c.
Send result and complete status for a job.
Definition at line 106 of file job.c.
Send exception for a running job.
Definition at line 136 of file job.c.
Send fail status for a job.
Definition at line 158 of file job.c.
Get job handle.
Definition at line 185 of file job.c.
Get the function name associated with a job.
Definition at line 190 of file job.c.
Get the unique ID associated with a job.
Definition at line 195 of file job.c.
Get a pointer to the workload for a job.
Definition at line 202 of file job.c.
Get size of the workload for a job.
Definition at line 207 of file job.c.
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.
Definition at line 212 of file job.c.