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. (peep gearman_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 for gearman_job_st. one of a kind, literally ✨
  • gearman_job_take_workload β€” returns the gearman_job_st workload, and you can figure out how big it is with gearman_job_workload_size(). here's the tea though: gearman_job_take_workload() is the same as gearman_job_workload() except that the result must be free(3)'d by the caller. so like, you own it now, bestie. it's your responsibility. 😭
  • gearman_job_use_client β€” returns a gearman_client_st <#c.gearman_client_st> that's been configured from a gearman_job_st. you can use that gearman_client_st to send client API commands to the server. BUT β€” and this is the important part β€” you do not, and should not, call gearman_client_free() <#c.gearman_client_free> on that gearman_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/>

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