GEARMAN_CLIENT_SET_FAIL_FN(3)
π GEARMAN_CLIENT_SET_FAIL_FN(3) π
okay bestie, welcome to the Gearmand manual β section 3, libraries, the whole thing. this page is literally the group chat for all your client callback setters, so grab a strawberry π and let's go.
β¨ NAME β¨
gearman_client_set_fail_fn β Gearmand Documentation, http://gearman.info/
like, that's the girl. that's the one this page is named after π
β¨ SYNOPSIS β¨
#include <libgearman/gearman.h>
the types you're gonna be playing with:
type gearman_actions_t
type gearman_workload_fn
type gearman_created_fn
type gearman_data_fn
type gearman_warning_fn
type gearman_universal_status_fn
type gearman_exception_fn
type gearman_fail_fn
type gearman_complete_fn
and the actual functions, no cap:
void gearman_client_set_workload_fn(gearman_client_st <#c.gearman_client_st> *client, gearman_workload_fn *function)
void gearman_client_set_created_fn(gearman_client_st <#c.gearman_client_st> *client, gearman_created_fn *function)
void gearman_client_set_data_fn(gearman_client_st <#c.gearman_client_st> *client, gearman_data_fn *function)
void gearman_client_set_warning_fn(gearman_client_st <#c.gearman_client_st> *client, gearman_warning_fn *function)
void gearman_client_set_status_fn(gearman_client_st <#c.gearman_client_st> *client, gearman_universal_status_fn *function)
void gearman_client_set_complete_fn(gearman_client_st <#c.gearman_client_st> *client, gearman_complete_fn *function)
void gearman_client_set_exception_fn(gearman_client_st <#c.gearman_client_st> *client, gearman_exception_fn *function)
void gearman_client_set_fail_fn(gearman_client_st <#c.gearman_client_st> *client, gearman_fail_fn *function)
void gearman_client_clear_fn(gearman_client_st <#c.gearman_client_st> *client)
const char *gearman_client_do_job_handle(gearman_client_st <#c.gearman_client_st> *client)
Link to -lgearman π (yes, you actually have to link it, don't just vibe and hope)
π DESCRIPTION π
Callbacks for client execution task states. that's the whole assignment, bestie.
gearman_client_set_data_fn() sets the callback function that will be called if server is to make a request to the client to provide more data. it's giving "the server needs more, girl, send it" π
gearman_client_do_job_handle() gets the job handle for the running task. this is the one you use between repeated gearman_client_do() (and related) calls to get information. so like, peek at it mid-task, don't spam it and expect a new rainbow every time π
gearman_client_clear_fn() can be called to remove all existing gearman_actions_t that have been set. poof, gone, clean slate, iconic β¨
gearman_client_set_created_fn(), gearman_client_set_data_fn(), gearman_client_set_warning_fn(), gearman_client_set_status_fn(), gearman_client_set_complete_fn(), gearman_client_set_exception_fn(), and gearman_client_set_fail_fn(), set callback functions for the different states of execution for a client request. Each request, ie a creation of gearman_task_st, keeps a copy of callbacks when it is created. notable!! your task made a lil photocopy of the callbacks at birth and that's the copy it lives with πΈ
gearman_client_set_exception_fn() will only be called if exceptions are enabled on the server. You can do this by calling gearman_client_set_server_option(). no exceptions enabled = no callback, periodt.
An example of this:
const char *EXCEPTIONS="exceptions";
gearman_client_set_server_option(client, EXCEPTIONS, strlen(EXCEPTIONS));
π¦ RETURN VALUE π¦
None. literally nothing comes back, it's a void situation, we move π
See also: gearmand(8) libgearman(3) gearman_client_error(3) or gearman_worker_error(3)
π Author π
Data Differential http://www.datadifferential.com/
π Copyright π
2011-2014, Data Differential, http://www.datadifferential.com/
and that's the page, bestie! this one's from version 1.1.21+ds, dated Feb 04, 2026 β the original GEARMAN_CLIENT_SET_FAIL_FN(3) header and footer, now folding neatly into your memory like a lil pressed flower πΈπ«Ά go forth and set those fail functions, iykyk π
π¦ 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