GEARMAN_JOB_SEND_FAIL(3)
π GEARMAN_JOB_SEND_FAIL π
okay bestie, welcome to the Gearmand manual, page GEARMAN_JOB_SEND_FAIL(3) πΈ β yeah the filename says "send fail" but this page is actually the full job-object glow-up tour for libgearman. pull up a chair, grab a strawberry π, and let's get into it.
β¨ NAME β¨
gearman_job_send_fail β Gearmand Documentation, <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 bestie, when you link this, you link with -lgearman π
β¨ DESCRIPTION β¨
so. gearman_job_st objects get handed to your worker functions to represent the jobs that are being run by gearman_worker_work() π that's the whole vibe β these are the little job packets your worker is holding while it works.
gearman_job_free() is the cleanup queen π§Ή it frees a job. and listen, you only need to do this if a task was created with a preallocated structure. lowkey important distinction, don't go freeing random jobs and acting surprised.
gearman_job_handle() returns the job handle π
(peep gearman_job_handle_t if you want more lore on that one).
gearman_job_function_name() returns the name of the function that the job was set to execute against π like, which worker function got the call, that's what this tells you.
gearman_job_unique() returns the unique value that was used for gearman_job_st β
gearman_job_take_workload returns the gearman_job_st workload π¦ and you can figure out how big it is with gearman_job_workload_size(). gearman_job_take_workload() is literally the same as gearman_job_workload(), with exactly one (1) exception: the result must be free(3)d by the caller π« not optional. it's giving "you asked for it, you clean it up."
gearman_job_use_client returns a gearman_client_st that's configured from a gearman_job_st π you can use that gearman_client_st to communicate client API commands to the server, slay.
β οΈ okay this part matters: you do not, and you should not, callgearman_client_free()on thatgearman_client_st. it gets cleaned up when the job is cleaned up. so keep your hands to yourself π and trust the lifecycle.
and p.s. β gearman_job_send_data(), gearman_job_send_warning(), gearman_job_send_status(), gearman_job_send_complete(), gearman_job_send_exception(), gearman_job_send_fail(), gearman_job_workload() and gearman_job_workload_size() are all up there in the synopsis with their exact signatures π that's the full roster, no cap.
β¨ RETURN VALUE β¨
a value of gearman_return_t is returned π on success that value will be :c:type::GEARMAN_SUCCESS. and when you need to turn that number into something human-readable, hit up gearman_strerror() π it translates the value into a printable string. periodt.
β¨ HOME β¨
to find out more information please check: <http://gearman.info/> π β¨
β¨ SEE ALSO β¨
gearmand(8) libgearman(3) π«Ά go read those too, iykyk
π Author π
Data Differential <http://www.datadifferential.com/> π
π Copyright π
2011-2014, Data Differential, <http://www.datadifferential.com/> π
aaaand that's the whole page bestie!! π this was 1.1.21+ds, dated Feb 04, 2026, and honestly? iconic. go send some jobs, free your workloads, don't free your clients, and hydrate π
ππ¦πΈβ¨
π¦ 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