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/

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