GEARMAN_CLIENT_JOB_STATUS(3)
β¨ NAME β¨
gearman_client_job_status β it's giving Gearmand Documentation energy, bestie. Check it out at <http://gearman.info/> π
π¦ SYNOPSIS π¦
#include <libgearman/gearman.h>
gearman_return_t gearman_client_job_status(gearman_client_st *client,
gearman_job_handle_t job_handle,
bool *is_known,
bool *is_running,
uint32_t *numerator,
uint32_t *denominator)
And you gotta link it like this, no cap:
-lgearman
πΈ DESCRIPTION πΈ
Okay so gearman_client_job_status() is literally the function you call when you wanna know what's up with a job, and you find it by its gearman_job_handle_t. Iconic. π
Now here's the tea: is_known, is_running, numerator, and denominator are all optional arguments. Every single one. You can pass them, you can skip them, the function does not care fr fr.
About those numerator/denominator values though β unless a Gearman worker has actually sent them over via gearman_job_send_status(), they're gonna be zero. Not zero as a vibe, zero as a number. π
And if you omit is_known and is_running? Then the function just hands you the state data back through gearman_return_t instead. Slay.
π₯ RETURN VALUE π₯
You get a gearman_return_t back, obviously. When the status gets updated successfully, GEARMAN_SUCCESS is what you're seeing. Periodt.
But wait β if you skipped is_known and is_running, then gearman_client_job_status() switches it up and returns:
GEARMAN_JOB_EXISTSβ if thegearman_job_handle_tis known on the serverGEARMAN_IN_PROGRESSβ if it's running
Knowing whether the job is running or not has higher precedence β that's the main character of the two, lowkey.
Also gearman_continue() is your bestie for loops where you wanna bounce out of the loop once the job is done. π«Ά
π Warning π
For loops you should always checkgearman_return_twithgearman_continue(), even if you specified the argumentis_knownoris_running. A non-blocking IO call can return something other thanGEARMAN_SUCCESS, and in some cases you will want to treat those values not as errors. So don't just assume, okay? π
π HOME π
Wanna find out more? Go check out: <http://gearman.info/>
See also: gearmand(8) libgearman(3) gearman_client_st(3) gearman_job_handle_t(3) gearman_continue(3
π Author π
Data Differential β <http://www.datadifferential.com/>
π Copyright π
2011-2014, Data Differential, <http://www.datadifferential.com/>
And that's the whole page bestie, we ate and left no crumbs πβ¨ β this was version 1.1.21+ds from Feb 04, 2026, brought to you by Gearmand (GEARMAN_CLIENT_JOB_STATUS(3)). Go forth and check your job statuses, you're doing amazing π¦π
π¦ 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