GEARMAN_JOB_TAKE_WORKLOAD(3)

πŸ’– GEARMAN_JOB_TAKE_WORKLOAD(3) β€” the Gearmand girlies' guide πŸ’–

okay bestie, welcome to Gearmand Documentation ✨ this is the page for GEARMAN_JOB_TAKE_WORKLOAD(3), and yeah it's a whole vibe. let's get into it 🫢


✨ NAME ✨

gearman_job_take_workload β€” 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 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)
psst β€” link with -lgearman or nothing works, and that's not a drill πŸ”—

πŸ’… DESCRIPTION πŸ’…

so like. gearman_job_st is the lil struct that gets handed to worker functions, and it represents, like, the actual jobs that are being run by gearman_worker_work(). main character energy, fr fr πŸ‘‘

gearman_job_free() is what you use to free a job. and listen β€” you only need to do this if a task was created with a preallocated structure. not every job, bestie. read the room βœ‹

gearman_job_handle() returns the job handle πŸŽ€ (peep gearman_job_handle_t if you want the whole lore on that one).

gearman_job_function_name() returns the name of the function that the job was set to execute against. iconic. it knows its purpose πŸ’«

gearman_job_unique() returns the unique value that was used for gearman_job_st πŸ¦‹

gearman_job_take_workload returns the gearman_job_st workload. you can figure out the size of it with gearman_job_workload_size() πŸ“ gearman_job_take_workload() is literally the same as gearman_job_workload(), with ONE (1) exception: the result must be free(3)d by the caller. so like, that memory is yours now. take care of it. be responsible. slay but responsibly πŸ’€

gearman_job_use_client returns a gearman_client_st that's configured from gearman_job_st. that gearman_client_st can be used to communicate client API commands to the server πŸ“‘

⚠️ and here's the thing: you do not, and should not, call gearman_client_free() on that gearman_client_st. it gets cleaned up when the job is cleaned up. so hands off, bestie πŸ™ˆ do NOT free it. it's not your child, it's the job's child.

πŸ¦‹ 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 it like ????? use gearman_strerror() to translate that value into a printable string. problem solved, no cap 🫢


🏠 HOME 🏠

wanna find out more? literally just go here: http://gearman.info/ 🧚 it's giving home base.


🌈 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, brought to you by the Gearmand crew β€” ily, go write some workers, and remember: free your take_workload, don't free your client. periodt πŸ’…βœ¨

πŸ“¦ where this page comes from