GEARMAN_JOB_SEND_EXCEPTION(3)

✨ GEARMAN_JOB_SEND_EXCEPTION ✨

okay bestie, buckle up πŸ’– this is the <gear_job_send_exception> page out of the Gearmand docs, and yes it lives over at http://gearman.info/ β€” she's a libgearman(3) girlie, iykyk.


🌸 NAME 🌸

gearman_job_send_exception β€” 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)

Link with -lgearman

Link with -lgearman fr fr, don't forget it πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

gearman_job_st is what gets handed to worker functions, and it represents the jobs that are being run by gearman_worker_work() <#c.gearman_worker_work>. she's the main character of your worker callback, periodt πŸ‘‘

  • gearman_job_free() β€” frees a job. the way that you only need to do this if a task was created with a preallocated structure?? lowkey iconic. no cap.
  • gearman_job_handle() β€” returns the job handle (go peek at gearman_job_handle_t <#c.gearman_job_handle_t> for more info bestie).
  • gearman_job_function_name() β€” returns the name of the function that the job was set to execute against. like, what was she even hired to do πŸ’…
  • 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 how big it is with gearman_job_workload_size(). gearman_job_take_workload() is literally the same as gearman_job_workload() except that the result must be free(3)'d by the caller. not optional, bestie β€” that's your cleanup duty now 🧹
  • gearman_job_use_client β€” returns a gearman_client_st <#c.gearman_client_st> configured from gearman_job_st. that gearman_client_st can be used to communicate client API commands to the server. and listen: you do not, and you 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. hands off, she's got a chaperone πŸ™ˆ

πŸ’œ RETURN VALUE πŸ’œ

a value of gearman_return_t <#c.gearman_return_t> is returned. on success that value will be :c:type::GEARMAN_SUCCESS. use gearman_strerror() <#c.gearman_strerror> to translate that value into a printable string. she speaks fluent error-code, you just need the translator app ✨


🌈 HOME 🌈

want more tea? go check out: http://gearman.info/


πŸ“ SEE ALSO πŸ“

gearmand(8) libgearman(3)


πŸ’– Author πŸ’–

Data Differential http://www.datadifferential.com/


2011-2014, Data Differential, http://www.datadifferential.com/


and that's the whole page, bestie, we ate and left zero crumbs πŸ”₯ this was version 1.1.21+ds, dated Feb 04, 2026, from the GEARMAN_JOB_SEND_EXCEPTION(3) era of the Gearmand manual. mwah, go free your workloads πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from