GEARMAN_JOB_FUNCTION_NAME(3)
π GEARMAN_JOB_FUNCTION_NAME π
okay so bestie, welcome to gearman_job_function_name β it's a gearmand page, section 3 of the manual, and the whole libgearman fam is gonna be up in here. official docs live at http://gearman.info/ if you want the full lore. β¨
β¨ SYNOPSIS β¨
like, here's the whole cast, fr fr:
#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 build, you link with -lgearman. don't forget it, she's essential π
πΈ DESCRIPTION πΈ
okay so here's the tea. gearman_job_st structs get handed to your worker functions to represent the jobs that are actively being run by gearman_worker_work(). like, it is the job. the whole moment. main character energy.
gearman_job_free()β frees a job. and listen, you only have to do this if the task was created with a preallocated structure. otherwise? hands off, bestie πgearman_job_handle()β returns the job handle. (peepgearman_job_handle_tfor the deets, iykyk.)gearman_job_function_name()β returns the name of the function that the job was set to execute against. that's literally the whole point of this page, icon behavior.gearman_job_unique()β returns the unique value that was used for thatgearman_job_st.gearman_job_take_workloadβ returns thegearman_job_stworkload. you can figure out how big it is withgearman_job_workload_size(). and heads up:gearman_job_take_workload()is the same asgearman_job_workload()except the result has to befree(3)d by you, the caller. yeah. that one's on you π«Άgearman_job_use_clientβ returns agearman_client_stthat's configured from thegearman_job_st. you can use thatgearman_client_stto send client API commands to the server, slay.
β οΈ okay important: you do not, and honestly should not, callgearman_client_free()on thatgearman_client_st. it gets cleaned up when the job is cleaned up. so like. leave her alone. she's fine. π
β RETURN VALUE β
a value of gearman_return_t is returned. on success, that value will be :c:type::GEARMAN_SUCCESS. and if you're staring at a weird number like ποΈπποΈ, use gearman_strerror() to translate it into a printable string. periodt.
π HOME π
wanna know 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 π this was version 1.1.21+ds, dated Feb 04, 2026, and it came to you from the GEARMAN_JOB_FUNCTION_NAME(3) girlies. go forth and gearman_job_function_name() responsibly πβ¨πΈ
π¦ 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