GEARMAN_JOB_SEND_DATA(3)
β¨ GEARMAN_JOB_SEND_DATA π
okay so bestie, you found the manpage for gearman_job_send_data β that's the Gearmand Documentation situation, and the whole homepage vibe lives at <http://gearman.info/> π¦
πΈ SYNOPSIS πΈ
#include <libgearman/gearman.h>
type gearman_job_st
void gearman_job_free(gearman_job_st *job)
gearman_return_t <#c.gearman_return_t>
gearman_job_send_data(gearman_job_st *job, const void *data, size_t <#c
.size_t> data_size)
gearman_return_t <#c.gearman_return_t>
gearman_job_send_warning(gearman_job_st *job, const void *warning,
size_t <#c.size_t> warning_size)
gearman_return_t <#c.gearman_return_t>
gearman_job_send_status(gearman_job_st *job, uint32_t <#c.uint32_t>
numerator, uint32_t <#c.uint32_t> denominator)
gearman_return_t <#c.gearman_return_t>
gearman_job_send_complete(gearman_job_st *job, const void *result,
size_t <#c.size_t> result_size)
gearman_return_t <#c.gearman_return_t>
gearman_job_send_exception(gearman_job_st *job, const void *exception,
size_t <#c.size_t> exception_size)
gearman_return_t <#c.gearman_return_t>
gearman_job_send_fail(gearman_job_st *job)
const char *gearman_job_handle(const gearman_job_st *job)
const 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 <#c.size_t> gearman_job_workload_size(const gearman_job_st *job)
void *gearman_job_take_workload(gearman_job_st *job, size_t <#c.size_t>
*data_size)
gearman_client_st <#c.gearman_client_st>
*gearman_job_use_client(gearman_job_st *job)
and when you link it, you link with -lgearman, no cap π
π DESCRIPTION π
gearman_job_st are literally handed straight to worker functions, and they represent the jobs that are being run by gearman_worker_work() <#c.gearman_worker_work>. it's giving "here's your assignment, go off" β¨
gearman_job_free() is how you free a job. and bestie, you only need to do this if a task was created with a preallocated structure β otherwise it's not your problem, okay? π
gearman_job_handle() returns the job handle (peep gearman_job_handle_t <#c.gearman_job_handle_t> if you want more on that) π
gearman_job_function_name() returns the name of the function that the job was set to execute against.
gearman_job_unique() returns the unique value that was used for gearman_job_st.
gearman_job_take_workload returns the gearman_job_st workload. the size of it can be figured out with gearman_job_workload_size(). and gearman_job_take_workload() is the same as gearman_job_workload() β except that the result must be free(3) by the caller. so like, it's yours now, you own it, you tidy it up π
gearman_job_use_client returns a gearman_client_st <#c.gearman_client_st> that's configured from gearman_job_st. that gearman_client_st can be used to communicate client API commands to the server. okay and this is the important bit, so listen up: you do not, and should not, call gearman_client_free() <#c.gearman_client_free> on the gearman_client_st. it gets cleaned up when the job is cleaned up. periodt π«Ά
β RETURN VALUE β
a value of gearman_return_t <#c.gearman_return_t> is returned. on success, that value will be :c:type::GEARMAN_SUCCESS. and if you're like "what does this even mean", use gearman_strerror() <#c.gearman_strerror> to translate the value into a printable string π
π HOME π
want more info? bestie, go check: <http://gearman.info/> π¦
π SEE ALSO π
π Author π
Data Differential <http://www.datadifferential.com/>
π Copyright π
2011-2014, Data Differential, <http://www.datadifferential.com/>
and that's the whole page, bestie β version 1.1.21+ds, dated Feb 04, 2026. slay, you read a manpage today πβ¨
π¦ where this page comes from
- ubuntu resolute: libgearman-dev 1.1.21+ds-1ubuntu3 Β· BSD-3-Clause
- ubuntu stonking: libgearman-dev 1.1.21+ds-1ubuntu3 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms