logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

gearman_continue - Gearmand Documentation, http://gearman.info/

Author

Description

gearman_return_t   is   used   as   a  return/error  type  for  all  calls  using  gearman_client_st  and
       gearman_worker_st.   GEARMAN_SUCCESS  is  returned  upon  success,  otherwise  an  error   is   returned.
       gearman_failed() can be used to see if the return value is a failing value.  You can print a text version
       of the error message with gearman_strerror().

       gearman_success() return true if GEARMAN_SUCCESS or if GEARMAN_NO_PENDING_TASKS tests true.

       gearman_failed() return true if any value other then GEARMAN_SUCCESS was provided.

       gearman_continue() returns true if any error related to non-blocking IO occurred. This should be used for
       testing loops.

   Possiblevaluesofgearman_return_t:typeGEARMAN_SUCCESS
              Success

       typeGEARMAN_NO_PENDING_TASKSgearman_client_run_tasks() was called and it has completed all tasks assigned to the client.

       typeGEARMAN_IO_WAIT
              Blocking IO was found. gearman_continue() can be used to test for this.

       typeGEARMAN_ERRNO
              System error occurred. Use either gearman_client_errno() or gearman_worker_errno()typeGEARMAN_NO_ACTIVE_FDS
              No active connections were available.  gearman_continue() can be used to test for this.

       typeGEARMAN_GETADDRINFO
              Name resolution failed for a host.

       typeGEARMAN_NO_SERVERS
              No servers have been provided for the client/worker.

       typeGEARMAN_LOST_CONNECTION
              Connection was lost to the given server.

       typeGEARMAN_MEMORY_ALLOCATION_FAILURE
              Memory allocation failed.

       typeGEARMAN_SERVER_ERROR
              An error occurred on the server.

       typeGEARMAN_NOT_CONNECTED
              Client/Worker is not currently connected to the server.

       typeGEARMAN_COULD_NOT_CONNECT
              Server name was valid, but a connection could not be made.

       typeGEARMAN_ECHO_DATA_CORRUPTION
              Either  gearman_client_echo()  or gearman_worker_echo() echo was unsuccessful because the data was
              returned from gearmand corrupted.

       typeGEARMAN_UNKNOWN_STATE
              The gearman_return_t was never set.

       typeGEARMAN_FLUSH_DATA
              Internal state, should never be seen by either client or worker.

       typeGEARMAN_SEND_BUFFER_TOO_SMALL
              Send buffer was too small.

       typeGEARMAN_TIMEOUT
              A timeout occurred when making a request to the server.

       typeGEARMAN_ARGUMENT_TOO_LARGE
              Argument was too large for the current buffer.

       typeGEARMAN_INVALID_ARGUMENT
              One  of  the  arguments  to  the  given  API  call  was   invalid.   EINVAL   will   be   set   if
              gearman_client_error()  or  gearman_worker_error() were not settable. This can also be returned if
              GEARMAN_CLIENT_UNBUFFERED_RESULT was set, but the client is not handling the data correctly.

   CLIENTONLYtypeGEARMAN_NEED_WORKLOAD_FN
              A  client  was  asked  for  work,  but  no  gearman_workload_fn  callback   was   specified.   See
              gearman_client_set_workload_fn()typeGEARMAN_WORK_FAIL
              A task has failed, and the worker has exited with an error or it called gearman_job_send_fail()typeGEARMAN_IN_PROGRESSgearman_client_job_status()  has  been  called for a gearman_job_handle_t and the Job is currently
              being run by a worker.

       typeGEARMAN_JOB_EXISTSgearman_client_job_status() has been called for a gearman_job_handle_t and the  Job  is  currently
              known by a server, but is not being run by a worker.

   WORKERONLYtypeGEARMAN_INVALID_FUNCTION_NAME
              A worker was sent a request for a job that it did not have a valid function for.

       typeGEARMAN_INVALID_WORKER_FUNCTION
              No callback was provided by the worker for a given function.

       typeGEARMAN_NO_REGISTERED_FUNCTION
              A  request  for  removing  a  given function from a worker was invalid since that function did not
              exist.

       typeGEARMAN_NO_REGISTERED_FUNCTIONS
              The worker has not registered any functions.

       typeGEARMAN_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.

   WORKERTOCLIENT
       Client  which  have  registered  a  custom  gearman_actions_t may use these value as return values to the
       calling client.

       typeGEARMAN_WORK_DATA
              Worker has sent a chunked piece of data to the client via gearman_job_send_data()typeGEARMAN_WORK_WARNING
              Worker has issued a warning to the client via gearman_job_send_warning()typeGEARMAN_WORK_STATUS
              Status has been updated by the worker via gearman_job_send_status()typeGEARMAN_WORK_EXCEPTION
              Worker has sent an exception the client via gearman_job_send_exception()typeGEARMAN_WORK_FAIL
              A task has failed, and the worker has exited with an error or it called gearman_job_send_fail()typeGEARMAN_WORK_ERROR
              A task has had an error and will be retried.

       typeGEARMAN_PAUSE
              Used   only   in   custom   application   for   client   return   based   on    GEARMAN_WORK_DATA,
              GEARMAN_WORK_WARNING,    GEARMAN_WORK_EXCEPTION,    GEARMAN_WORK_FAIL,   or   GEARMAN_WORK_STATUS.
              gearman_continue() can be used to check for this value.

   WORKERTOCLIENT
       Any function defined  by  gearman_worker_define_function()  may,  and  can  only,  return  the  following
       gearman_return_t values.

       typeGEARMAN_SUCCESS
              The function successfully completed the job.

       typeGEARMAN_FATALtypeGEARMAN_FAIL
              The function failed to complete the job. GEARMAN_FATAL is the deprecated name for GEARMAN_FAILtypeGEARMAN_ERROR
              A task has had an error and will be retried.

       typeGEARMAN_SHUTDOWNGEARMAN_SHUTDOWN is a special case. If it is returned the client will be sent GEARMAN_SUCCESS, but
              gearman_worker_work() will exit with GEARMAN_SHUTDOWN.

   TASKONLYtypeGEARMAN_NOT_FLUSHINGgearman_task_send_workload() failed, it was not in the correct state.

       typeGEARMAN_DATA_TOO_LARGEgearman_task_send_workload() failed, the data was too large to be sent.

       typeGEARMAN_UNKNOWN_OPTION
              Default state of task return value.

   PROTOCOL
       If any of these errors occurred the connection will be dropped/reset.

       typeGEARMAN_INVALID_MAGICtypeGEARMAN_INVALID_COMMANDtypeGEARMAN_INVALID_PACKETtypeGEARMAN_UNEXPECTED_PACKETtypeGEARMAN_TOO_MANY_ARGSDEPRECATEDtypeGEARMAN_IGNORE_PACKETtypeGEARMAN_MAX_RETURN

Name

       gearman_continue - Gearmand Documentation, http://gearman.info/

See Also

gearmand(8)libgearman(3)gearman_client_error() or gearman_worker_error()

Synopsis

       #include <libgearman/gearman.h>

       typegearman_return_tconstchar*gearman_strerror(gearman_return_trc)boolgearman_success(gearman_return_trc)boolgearman_failed(gearman_return_trc)boolgearman_continue(gearman_return_trc)

       Compile and link with -lgearman

See Also