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. (peep gearman_job_handle_t for 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 that gearman_job_st.
  • gearman_job_take_workload β€” returns the gearman_job_st workload. you can figure out how big it is with gearman_job_workload_size(). and heads up: gearman_job_take_workload() is the same as gearman_job_workload() except the result has to be free(3)d by you, the caller. yeah. that one's on you 🫢
  • gearman_job_use_client β€” returns a gearman_client_st that's configured from the gearman_job_st. you can use that gearman_client_st to send client API commands to the server, slay.
⚠️ okay important: you do not, and honestly should not, call gearman_client_free() on that gearman_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/

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