GEARMAN_JOB_SEND_COMPLETE(3)
π GEARMAN_JOB_SEND_COMPLETE π
okay so bestie, welcome to the gearmand manual, section 3 π this one's all about the worker side of things β the lil' functions you call when you're the one doing the job instead of the one asking for it. full docs live at http://gearman.info/ if you want the β¨loreβ¨.
πΈ NAME πΈ
gearman_job_send_complete β Gearmand Documentation, http://gearman.info/
β¨ SYNOPSIS β¨
the vibes, verbatim π :
#include <libgearman/gearman.h>
type gearman_job_st
void gearman_job_free(gearman_job_st *job)
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)
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 gearman_job_workload_size(const gearman_job_st *job)
void *gearman_job_take_workload(gearman_job_st *job, size_t *data_size)
gearman_client_st *gearman_job_use_client(gearman_job_st *job)
and when you link, you link with -lgearman. that's the whole vibe check, no notes π«Ά
π DESCRIPTION π
so like, gearman_job_st is the lil' struct that gets passed to your worker functions to represent the jobs that are actually being run by gearman_worker_work(). it's giving main character energy, fr fr β every job gets one. π
gearman_job_free()is the one that lets a job go π¦. lowkey you only have to do this if a task was created with a preallocated structure β otherwise don't stress.gearman_job_handle()hands you back the job handle (peepgearman_job_handle_tif you want the whole story on that).gearman_job_function_name()returns the name of the function that the job was set to execute against. iykyk.gearman_job_unique()returns the unique value that was used for thegearman_job_st. it's literally unique, that's the point bestie β¨gearman_job_take_workloadreturns thegearman_job_stworkload. you can figure out how big it is withgearman_job_workload_size(). and here's the tea:gearman_job_take_workload()is the same asgearman_job_workload()EXCEPT the result must befree(3)'d by the caller. so like, you own it now, babes β clean up after yourself πgearman_job_use_clientreturns agearman_client_stconfigured from thegearman_job_st. thatgearman_client_stcan be used to communicate client API commands to the server. π
β οΈ okay important: you do not, and should not, callgearman_client_free()on thatgearman_client_st. it gets cleaned up when the job is cleaned up. it's not yours, don't touch it, it has a home already ππ«Ά
β RETURN VALUE β
you get back a gearman_return_t. on success that value will be GEARMAN_SUCCESS π and when it's not that, use gearman_strerror() to translate the value into a printable string so you can actually read what went wrong. iconic little helper, honestly.
π HOME π
want more? 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 a wrap bestie π this was Gearmand 1.1.21+ds, dated Feb 04, 2026 β go forth and send those completions, you absolute server-side legend πβ¨π
π¦ 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