GEARMAN_JOB_SEND_STATUS(3)
π GEARMAN_JOB_SEND_STATUS(3) π
okay so bestie, welcome to the Gearmand Documentation corner of the internet β that's what gearman_job_send_status is all about, and the official hangout spot is <http://gearman.info/> β¨
π SYNOPSIS π
like, this whole squad lives in one header, no cap:
#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're linking all this together, you gotta link with -lgearman π«Ά
β¨ DESCRIPTION β¨
so gearman_job_st is the lil' glow-up that gets passed to worker functions β it represents the jobs that are actively being run by gearman_worker_work() <#c.gearman_worker_work>. main character energy fr fr π
gearman_job_free()β this one frees a job. and no, you don't have to do it every single time, bestie: it only needs to happen if a task was created with a preallocated structure. lowkey specific, but iconic. πgearman_job_handle()β returns the job handle. (peepgearman_job_handle_t<#c.gearman_job_handle_t> if you want more info on that, iykyk π)gearman_job_function_name()β returns the name of the function that the job was set to execute against. it's giving "who am i doing this for" πΈgearman_job_unique()β returns the unique value that was used forgearman_job_st. one of a kind, literally β¨gearman_job_take_workloadβ returns thegearman_job_stworkload, and you can figure out how big it is withgearman_job_workload_size(). here's the tea though:gearman_job_take_workload()is the same asgearman_job_workload()except that the result must befree(3)'d by the caller. so like, you own it now, bestie. it's your responsibility. πgearman_job_use_clientβ returns agearman_client_st<#c.gearman_client_st> that's been configured from agearman_job_st. you can use thatgearman_client_stto send client API commands to the server. BUT β and this is the important part β you do not, and should not, callgearman_client_free()<#c.gearman_client_free> on thatgearman_client_st. it gets cleaned up when the job gets cleaned up. don't do it, bestie, we're begging π
π 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 wanna know what your value actually means, use gearman_strerror() <#c.gearman_strerror> to translate it into a printable string. vibe check complete β
π HOME π
wanna find out more? go check out: <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 β brought to you by version 1.1.21+ds, dated Feb 04, 2026. slay, ate, no crumbs, periodt. π
β¨ππ
π¦ 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