GEARMAN_CONTINUE(3)
okay bestie, sit down, hydrate, because this is the GEARMAN_CONTINUE(3) page from the Gearmand manual and it's literally the master list of every single error code libgearman can throw at you. no cap, it's a lot. but you're gonna eat this up. π
β¨ NAME β¨
gearman_continue β Gearmand Documentation, http://gearman.info/ π
π¦ SYNOPSIS π¦
#include <libgearman/gearman.h>
type gearman_return_t
const char *gearman_strerror(gearman_return_t rc)
bool gearman_success(gearman_return_t rc)
bool gearman_failed(gearman_return_t rc)
bool gearman_continue(gearman_return_t rc)
and when you build, you link it up like this:
-lgearman
π DESCRIPTION π
so gearman_return_t is the return/error type for literally every call that touches gearman_client_st or gearman_worker_st. when everything's cute and fine you get GEARMAN_SUCCESS back β anything else means something went sideways. wanna know if your return value is a flop? gearman_failed(). wanna print the error as actual human-readable text? gearman_strerror() has you. π«Ά
gearman_success()β returns true if you gotGEARMAN_SUCCESS, or ifGEARMAN_NO_PENDING_TASKStests true. two ways to win, iconic.gearman_failed()β returns true if literally any value other thanGEARMAN_SUCCESSwas handed to it.gearman_continue()β returns true if any error related to non-blocking IO went down. this is the one you use to test your loops, periodt.
πΈ Possible values of gearman_return_t πΈ
- type
GEARMAN_SUCCESSβ Success β¨ (the good ending) - type
GEARMAN_NO_PENDING_TASKSβgearman_client_run_tasks()was called and it has completed all tasks assigned to the client. - type
GEARMAN_IO_WAITβ Blocking IO was found.gearman_continue()can be used to test for this. - type
GEARMAN_ERRNOβ System error occurred. Use eithergearman_client_errno()orgearman_worker_errno() - type
GEARMAN_NO_ACTIVE_FDSβ No active connections were available.gearman_continue()can be used to test for this. - type
GEARMAN_GETADDRINFOβ Name resolution failed for a host. π - type
GEARMAN_NO_SERVERSβ No servers have been provided for the client/worker. - type
GEARMAN_LOST_CONNECTIONβ Connection was lost to the given server. π - type
GEARMAN_MEMORY_ALLOCATION_FAILUREβ Memory allocation failed. - type
GEARMAN_SERVER_ERRORβ An error occurred on the server. - type
GEARMAN_NOT_CONNECTEDβ Client/Worker is not currently connected to the server. - type
GEARMAN_COULD_NOT_CONNECTβ Server name was valid, but a connection could not be made. - type
GEARMAN_ECHO_DATA_CORRUPTIONβ Eithergearman_client_echo()orgearman_worker_echo()echo was unsuccessful because the data was returned from gearmand corrupted. - type
GEARMAN_UNKNOWN_STATEβ Thegearman_return_twas never set. it's giving mystery, and not the fun kind. - type
GEARMAN_FLUSH_DATAβ Internal state, should never be seen by either client or worker. - type
GEARMAN_SEND_BUFFER_TOO_SMALLβ Send buffer was too small. - type
GEARMAN_TIMEOUTβ A timeout occurred when making a request to the server. - type
GEARMAN_ARGUMENT_TOO_LARGEβ Argument was too large for the current buffer. - type
GEARMAN_INVALID_ARGUMENTβ One of the arguments to the given API call was invalid.EINVALwill be set ifgearman_client_error()orgearman_worker_error()were not settable. This can also be returned ifGEARMAN_CLIENT_UNBUFFERED_RESULTwas set, but the client is not handling the data correctly.
π CLIENT ONLY π
- type
GEARMAN_NEED_WORKLOAD_FNβ A client was asked for work, but nogearman_workload_fncallback was specified. Seegearman_client_set_workload_fn() - type
GEARMAN_WORK_FAILβ A task has failed, and the worker has exited with an error or it calledgearman_job_send_fail() - type
GEARMAN_IN_PROGRESSβgearman_client_job_status()has been called for agearman_job_handle_tand the Job is currently being run by a worker. - type
GEARMAN_JOB_EXISTSβgearman_client_job_status()has been called for agearman_job_handle_tand the Job is currently known by a server, but is not being run by a worker.
π§ WORKER ONLY π§
- type
GEARMAN_INVALID_FUNCTION_NAMEβ A worker was sent a request for a job that it did not have a valid function for. - type
GEARMAN_INVALID_WORKER_FUNCTIONβ No callback was provided by the worker for a given function. - type
GEARMAN_NO_REGISTERED_FUNCTIONβ A request for removing a given function from a worker was invalid since that function did not exist. - type
GEARMAN_NO_REGISTERED_FUNCTIONSβ The worker has not registered any functions. - type
GEARMAN_NO_JOBSβ No jobs were found for the worker. This error code is only returned if the worker has just made a request for jobs.
π WORKER TO CLIENT π
Client which have registered a custom gearman_actions_t may use these value as return values to the calling client.
- type
GEARMAN_WORK_DATAβ Worker has sent a chunked piece of data to the client viagearman_job_send_data() - type
GEARMAN_WORK_WARNINGβ Worker has issued a warning to the client viagearman_job_send_warning() - type
GEARMAN_WORK_STATUSβ Status has been updated by the worker viagearman_job_send_status() - type
GEARMAN_WORK_EXCEPTIONβ Worker has sent an exception the client viagearman_job_send_exception() - type
GEARMAN_WORK_FAILβ A task has failed, and the worker has exited with an error or it calledgearman_job_send_fail() - type
GEARMAN_WORK_ERRORβ A task has had an error and will be retried. - type
GEARMAN_PAUSEβ Used only in custom application for client return based onGEARMAN_WORK_DATA,GEARMAN_WORK_WARNING,GEARMAN_WORK_EXCEPTION,GEARMAN_WORK_FAIL, orGEARMAN_WORK_STATUS.gearman_continue()can be used to check for this value.
π WORKER TO CLIENT π (yes bestie, there's a second one, this one's about the return values)
Any function defined by gearman_worker_define_function() may, and can only, return the following gearman_return_t values.
- type
GEARMAN_SUCCESSβ The function successfully completed the job. β¨ - type
GEARMAN_FATAL - type
GEARMAN_FAILβ The function failed to complete the job.GEARMAN_FATALis the deprecated name forGEARMAN_FAIL - type
GEARMAN_ERRORβ A task has had an error and will be retried. - type
GEARMAN_SHUTDOWNβGEARMAN_SHUTDOWNis a special case. If it is returned the client will be sentGEARMAN_SUCCESS, butgearman_worker_work()will exit withGEARMAN_SHUTDOWN.
π TASK ONLY π
- type
GEARMAN_NOT_FLUSHINGβgearman_task_send_workload()failed, it was not in the correct state. - type
GEARMAN_DATA_TOO_LARGEβgearman_task_send_workload()failed, the data was too large to be sent. - type
GEARMAN_UNKNOWN_OPTIONβ Default state of task return value.
β οΈ PROTOCOL β οΈ
If any of these errors occurred the connection will be dropped/reset.
like, gone gone. π¨
- type
GEARMAN_INVALID_MAGIC - type
GEARMAN_INVALID_COMMAND - type
GEARMAN_INVALID_PACKET - type
GEARMAN_UNEXPECTED_PACKET - type
GEARMAN_TOO_MANY_ARGS
π°οΈ DEPRECATED π°οΈ
old and busted, don't be surprised if you never meet them:
- type
GEARMAN_IGNORE_PACKET - type
GEARMAN_MAX_RETURN
π«Ά SEE ALSO π«Ά
gearmand(8) libgearman(3) gearman_client_error() or gearman_worker_error()
π Author π
Data Differential http://www.datadifferential.com/
π Copyright π
2011-2014, Data Differential, http://www.datadifferential.com/
and that's the whole page bestie, ily, go forth and check your return values π this was GEARMAN_CONTINUE(3) from the Gearmand manual, version 1.1.21+ds, dated Feb 04, 2026. slay, no cap, periodt. ππ
π¦ 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