diff --git a/reference/gearman/constants.xml b/reference/gearman/constants.xml index 77dc4da5d9..31ee469faf 100644 --- a/reference/gearman/constants.xml +++ b/reference/gearman/constants.xml @@ -4,6 +4,403 @@ &reftitle.constants; &extension.constants; + + Return values. Always check GearmanClient::error or + GearmanWorker for a string error, as it may contain + more details: + + + + + + GEARMAN_SUCCESS + (integer) + + + + Whatever action was taken was successful. + + + + + + GEARMAN_IO_WAIT + (integer) + + + + When in non-blocking mode, an event is hit that would have blocked. + + + + + + GEARMAN_ERRNO + (integer) + + + + A system error. Check GearmanClient::errno or + GearmanWorker::errno for the system error code that + was returned. + + + + + + GEARMAN_NO_ACTIVE_FDS + (integer) + + + + GearmanClient::wait or GearmanWorker was + called with no connections. + + + + + + GEARMAN_UNEXPECTED_PACKET + (integer) + + + + Indicates something going very wrong in gearmand. Applies only to + GearmanWorker. + + + + + + GEARMAN_GETADDRINFO + (integer) + + + + DNS resolution failed (invalid host, port, etc). + + + + + + GEARMAN_NO_SERVERS + (integer) + + + + Did not call GearmanClient::addServer before submitting jobs + or tasks. + + + + + + GEARMAN_LOST_CONNECTION + (integer) + + + + Lost a connection during a request. + + + + + + GEARMAN_MEMORY_ALLOCATION_FAILURE + (integer) + + + + Memory allocation failed (ran out of memory). + + + + + + GEARMAN_SERVER_ERROR + (integer) + + + + Something went wrong in the Gearman server and it could not handle the + request gracefully. + + + + + + GEARMAN_WORK_DATA + (integer) + + + + Notice return code obtained with GearmanClient::returnCode + when using GearmanClient::do. Sent to update the client + with data from a running job. A worker uses this when it needs to send updates, + send partial results, or flush data during long running jobs. + + + + + + GEARMAN_WORK_WARNING + (integer) + + + + Notice return code obtained with GearmanClient::returnCode + when using GearmanClient::do. Updates the client with + a warning. The behavior is just like GEARMAN_WORK_DATA, but + should be treated as a warning instead of normal response data. + + + + + + GEARMAN_WORK_STATUS + (integer) + + + + Notice return code obtained with GearmanClient::returnCode + when using GearmanClient::do. Sent to update the status + of a long running job. Use GearmanClient::doStatus to obtain + the percentage complete of the task. + + + + + + GEARMAN_WORK_EXCEPTION + (integer) + + + + Notice return code obtained with GearmanClient::returnCode + when using GearmanClient::do. Indicates that a job failed + with a given exception. + + + + + + GEARMAN_WORK_FAIL + (integer) + + + + Notice return code obtained with GearmanClient::returnCode + when using GearmanClient::do. Indicates that the job failed. + + + + + + GEARMAN_COULD_NOT_CONNECT + (integer) + + + + Failed to connect to servers. + + + + + + GEARMAN_INVALID_FUNCTION_NAME + (integer) + + + + Trying to register a function name of NULL or using the callback interface + without specifying callbacks. + + + + + + GEARMAN_INVALID_WORKER_FUNCTION + (integer) + + + + Trying to register a function with a NULL callback function. + + + + + + GEARMAN_NO_REGISTERED_FUNCTIONS + (integer) + + + + When a worker gets a job for a function it did not register. + + + + + + GEARMAN_NO_JOBS + (integer) + + + + For a bob-blocking worker, when GearmanWorker::work does not have + any active jobs. + + + + + + GEARMAN_ECHO_DATA_CORRUPTION + (integer) + + + + After GearmanClient::echo or GearmanWorker::echo + the data returned doesn't match the data sent. + + + + + + GEARMAN_NEED_WORKLOAD_FN + (integer) + + + + When the client opted to stream the workload of a task, but did not + specify a workload callback function. + + + + + + GEARMAN_PAUSE + (integer) + + + + For the non-blocking client task interface, can be returned from the task callback + to "pause" the call and return from GearmanClient::runTasks. + Call GearmanClient::runTasks again to continue. + + + + + + GEARMAN_UNKNOWN_STATE + (integer) + + + + Internal client/worker state error. + + + + + + GEARMAN_SEND_BUFFER_TOO_SMALL + (integer) + + + + Internal error: trying to flush more data in one atomic chunk than is possible + due to hard-coded buffer sizes. + + + + + + GEARMAN_TIMEOUT + (integer) + + + + Hit the timeout limit set by the client/worker. + + + + + + + + GearmanClient options: + + + + + + GEARMAN_CLIENT_NON_BLOCKING + (integer) + + + + Run the cient in a non-blocking mode. + + + + + + GEARMAN_CLIENT_UNBUFFERED_RESULT + (integer) + + + + Allow the client to read data in chunks rather than have the library + buffer the entire data result and pass that back. + + + + + + GEARMAN_CLIENT_FREE_TASKS + (integer) + + + + Automatically free task objects once they are complete. This is the default + setting in this extension to prevent memory leaks. + + + + + + + + GearmanWorker options: + + + + + + GEARMAN_WORKER_NON_BLOCKING + (integer) + + + + Run the worker in non-blocking mode. + + + + + + GEARMAN_WORKER_GRAB_UNIQ + (integer) + + + + Return the client assigned unique ID in addition to the job handle. + + + + + + + + Base Gearman configuration: + @@ -56,26 +453,6 @@ - - - GEARMAN_DEFAULT_BACKLOG - (integer) - - - - - - - - - GEARMAN_DEFAULT_MAX_QUEUE_SIZE - (integer) - - - - - - GEARMAN_MAX_ERROR_SIZE @@ -166,86 +543,6 @@ - - - GEARMAN_SERVER_CON_ID_SIZE - (integer) - - - - - - - - - GEARMAN_JOB_HASH_SIZE - (integer) - - - - - - - - - GEARMAN_MAX_FREE_SERVER_CON - (integer) - - - - - - - - - GEARMAN_MAX_FREE_SERVER_PACKET - (integer) - - - - - - - - - GEARMAN_MAX_FREE_SERVER_JOB - (integer) - - - - - - - - - GEARMAN_MAX_FREE_SERVER_CLIENT - (integer) - - - - - - - - - GEARMAN_MAX_FREE_SERVER_WORKER - (integer) - - - - - - - - - GEARMAN_TEXT_RESPONSE_SIZE - (integer) - - - - - - GEARMAN_WORKER_WAIT_TIMEOUT @@ -256,1876 +553,6 @@ - - - GEARMAN_PIPE_BUFFER_SIZE - (integer) - - - - - - - - - GEARMAN_SUCCESS - (integer) - - - - - - - - - GEARMAN_IO_WAIT - (integer) - - - - - - - - - GEARMAN_SHUTDOWN - (integer) - - - - - - - - - GEARMAN_SHUTDOWN_GRACEFUL - (integer) - - - - - - - - - GEARMAN_ERRNO - (integer) - - - - - - - - - GEARMAN_EVENT - (integer) - - - - - - - - - GEARMAN_TOO_MANY_ARGS - (integer) - - - - - - - - - GEARMAN_NO_ACTIVE_FDS - (integer) - - - - - - - - - GEARMAN_INVALID_MAGIC - (integer) - - - - - - - - - GEARMAN_INVALID_COMMAND - (integer) - - - - - - - - - GEARMAN_INVALID_PACKET - (integer) - - - - - - - - - GEARMAN_UNEXPECTED_PACKET - (integer) - - - - - - - - - GEARMAN_GETADDRINFO - (integer) - - - - - - - - - GEARMAN_NO_SERVERS - (integer) - - - - - - - - - GEARMAN_LOST_CONNECTION - (integer) - - - - - - - - - GEARMAN_MEMORY_ALLOCATION_FAILURE - (integer) - - - - - - - - - GEARMAN_JOB_EXISTS - (integer) - - - - - - - - - GEARMAN_JOB_QUEUE_FULL - (integer) - - - - - - - - - GEARMAN_SERVER_ERROR - (integer) - - - - - - - - - GEARMAN_WORK_ERROR - (integer) - - - - - - - - - GEARMAN_WORK_DATA - (integer) - - - - - - - - - GEARMAN_WORK_WARNING - (integer) - - - - - - - - - GEARMAN_WORK_STATUS - (integer) - - - - - - - - - GEARMAN_WORK_EXCEPTION - (integer) - - - - - - - - - GEARMAN_WORK_FAIL - (integer) - - - - - - - - - GEARMAN_NOT_CONNECTED - (integer) - - - - - - - - - GEARMAN_COULD_NOT_CONNECT - (integer) - - - - - - - - - GEARMAN_SEND_IN_PROGRESS - (integer) - - - - - - - - - GEARMAN_RECV_IN_PROGRESS - (integer) - - - - - - - - - GEARMAN_NOT_FLUSHING - (integer) - - - - - - - - - GEARMAN_DATA_TOO_LARGE - (integer) - - - - - - - - - GEARMAN_INVALID_FUNCTION_NAME - (integer) - - - - - - - - - GEARMAN_INVALID_WORKER_FUNCTION - (integer) - - - - - - - - - GEARMAN_NO_REGISTERED_FUNCTIONS - (integer) - - - - - - - - - GEARMAN_NO_JOBS - (integer) - - - - - - - - - GEARMAN_ECHO_DATA_CORRUPTION - (integer) - - - - - - - - - GEARMAN_NEED_WORKLOAD_FN - (integer) - - - - - - - - - GEARMAN_PAUSE - (integer) - - - - - - - - - GEARMAN_UNKNOWN_STATE - (integer) - - - - - - - - - GEARMAN_PTHREAD - (integer) - - - - - - - - - GEARMAN_PIPE_EOF - (integer) - - - - - - - - - GEARMAN_QUEUE_ERROR - (integer) - - - - - - - - - GEARMAN_MAX_RETURN - (integer) - - - - - - - - - GEARMAN_VERBOSE_FATAL - (integer) - - - - - - - - - GEARMAN_VERBOSE_ERROR - (integer) - - - - - - - - - GEARMAN_VERBOSE_INFO - (integer) - - - - - - - - - GEARMAN_VERBOSE_DEBUG - (integer) - - - - - - - - - GEARMAN_VERBOSE_CRAZY - (integer) - - - - - - - - - GEARMAN_ALLOCATED - (integer) - - - - - - - - - GEARMAN_NON_BLOCKING - (integer) - - - - - - - - - GEARMAN_DONT_TRACK_PACKETS - (integer) - - - - - - - - - GEARMAN_CON_ALLOCATED - (integer) - - - - - - - - - GEARMAN_CON_READY - (integer) - - - - - - - - - GEARMAN_CON_PACKET_IN_USE - (integer) - - - - - - - - - GEARMAN_CON_EXTERNAL_FD - (integer) - - - - - - - - - GEARMAN_CON_STATE_ADDRINFO - (integer) - - - - - - - - - GEARMAN_CON_STATE_CONNECT - (integer) - - - - - - - - - GEARMAN_CON_STATE_CONNECTING - (integer) - - - - - - - - - GEARMAN_CON_STATE_CONNECTED - (integer) - - - - - - - - - GEARMAN_CON_SEND_STATE_NONE - (integer) - - - - - - - - - GEARMAN_CON_SEND_STATE_PRE_FLUSH - (integer) - - - - - - - - - GEARMAN_CON_SEND_STATE_FORCE_FLUSH - (integer) - - - - - - - - - GEARMAN_CON_SEND_STATE_FLUSH - (integer) - - - - - - - - - GEARMAN_CON_SEND_STATE_FLUSH_DATA - (integer) - - - - - - - - - GEARMAN_CON_RECV_STATE_NONE - (integer) - - - - - - - - - GEARMAN_CON_RECV_STATE_READ - (integer) - - - - - - - - - GEARMAN_CON_RECV_STATE_READ_DATA - (integer) - - - - - - - - - GEARMAN_PACKET_ALLOCATED - (integer) - - - - - - - - - GEARMAN_PACKET_COMPLETE - (integer) - - - - - - - - - GEARMAN_PACKET_FREE_DATA - (integer) - - - - - - - - - GEARMAN_MAGIC_TEXT - (integer) - - - - - - - - - GEARMAN_MAGIC_REQUEST - (integer) - - - - - - - - - GEARMAN_MAGIC_RESPONSE - (integer) - - - - - - - - - GEARMAN_COMMAND_TEXT - (integer) - - - - - - - - - GEARMAN_COMMAND_CAN_DO - (integer) - - - - - - - - - GEARMAN_COMMAND_CANT_DO - (integer) - - - - - - - - - GEARMAN_COMMAND_RESET_ABILITIES - (integer) - - - - - - - - - GEARMAN_COMMAND_PRE_SLEEP - (integer) - - - - - - - - - GEARMAN_COMMAND_UNUSED - (integer) - - - - - - - - - GEARMAN_COMMAND_NOOP - (integer) - - - - - - - - - GEARMAN_COMMAND_SUBMIT_JOB - (integer) - - - - - - - - - GEARMAN_COMMAND_JOB_CREATED - (integer) - - - - - - - - - GEARMAN_COMMAND_GRAB_JOB - (integer) - - - - - - - - - GEARMAN_COMMAND_NO_JOB - (integer) - - - - - - - - - GEARMAN_COMMAND_JOB_ASSIGN - (integer) - - - - - - - - - GEARMAN_COMMAND_WORK_STATUS - (integer) - - - - - - - - - GEARMAN_COMMAND_WORK_COMPLETE - (integer) - - - - - - - - - GEARMAN_COMMAND_WORK_FAIL - (integer) - - - - - - - - - GEARMAN_COMMAND_GET_STATUS - (integer) - - - - - - - - - GEARMAN_COMMAND_ECHO_REQ - (integer) - - - - - - - - - GEARMAN_COMMAND_ECHO_RES - (integer) - - - - - - - - - GEARMAN_COMMAND_SUBMIT_JOB_BG - (integer) - - - - - - - - - GEARMAN_COMMAND_ERROR - (integer) - - - - - - - - - GEARMAN_COMMAND_STATUS_RES - (integer) - - - - - - - - - GEARMAN_COMMAND_SUBMIT_JOB_HIGH - (integer) - - - - - - - - - GEARMAN_COMMAND_SET_CLIENT_ID - (integer) - - - - - - - - - GEARMAN_COMMAND_CAN_DO_TIMEOUT - (integer) - - - - - - - - - GEARMAN_COMMAND_ALL_YOURS - (integer) - - - - - - - - - GEARMAN_COMMAND_WORK_EXCEPTION - (integer) - - - - - - - - - GEARMAN_COMMAND_OPTION_REQ - (integer) - - - - - - - - - GEARMAN_COMMAND_OPTION_RES - (integer) - - - - - - - - - GEARMAN_COMMAND_WORK_DATA - (integer) - - - - - - - - - GEARMAN_COMMAND_WORK_WARNING - (integer) - - - - - - - - - GEARMAN_COMMAND_GRAB_JOB_UNIQ - (integer) - - - - - - - - - GEARMAN_COMMAND_JOB_ASSIGN_UNIQ - (integer) - - - - - - - - - GEARMAN_COMMAND_SUBMIT_JOB_HIGH_BG - (integer) - - - - - - - - - GEARMAN_COMMAND_SUBMIT_JOB_LOW - (integer) - - - - - - - - - GEARMAN_COMMAND_SUBMIT_JOB_LOW_BG - (integer) - - - - - - - - - GEARMAN_COMMAND_SUBMIT_JOB_SCHED - (integer) - - - - - - - - - GEARMAN_COMMAND_SUBMIT_JOB_EPOCH - (integer) - - - - - - - - - GEARMAN_COMMAND_MAX - (integer) - - - - - - - - - GEARMAN_TASK_ALLOCATED - (integer) - - - - - - - - - GEARMAN_TASK_SEND_IN_USE - (integer) - - - - - - - - - GEARMAN_TASK_STATE_NEW - (integer) - - - - - - - - - GEARMAN_TASK_STATE_SUBMIT - (integer) - - - - - - - - - GEARMAN_TASK_STATE_WORKLOAD - (integer) - - - - - - - - - GEARMAN_TASK_STATE_WORK - (integer) - - - - - - - - - GEARMAN_TASK_STATE_CREATED - (integer) - - - - - - - - - GEARMAN_TASK_STATE_DATA - (integer) - - - - - - - - - GEARMAN_TASK_STATE_WARNING - (integer) - - - - - - - - - GEARMAN_TASK_STATE_STATUS - (integer) - - - - - - - - - GEARMAN_TASK_STATE_COMPLETE - (integer) - - - - - - - - - GEARMAN_TASK_STATE_EXCEPTION - (integer) - - - - - - - - - GEARMAN_TASK_STATE_FAIL - (integer) - - - - - - - - - GEARMAN_TASK_STATE_FINISHED - (integer) - - - - - - - - - GEARMAN_JOB_ALLOCATED - (integer) - - - - - - - - - GEARMAN_JOB_ASSIGNED_IN_USE - (integer) - - - - - - - - - GEARMAN_JOB_WORK_IN_USE - (integer) - - - - - - - - - GEARMAN_JOB_FINISHED - (integer) - - - - - - - - - GEARMAN_JOB_PRIORITY_HIGH - (integer) - - - - - - - - - GEARMAN_JOB_PRIORITY_NORMAL - (integer) - - - - - - - - - GEARMAN_JOB_PRIORITY_LOW - (integer) - - - - - - - - - GEARMAN_JOB_PRIORITY_MAX - (integer) - - - - - - - - - GEARMAN_CLIENT_ALLOCATED - (integer) - - - - - - - - - GEARMAN_CLIENT_NON_BLOCKING - (integer) - - - - - - - - - GEARMAN_CLIENT_TASK_IN_USE - (integer) - - - - - - - - - GEARMAN_CLIENT_UNBUFFERED_RESULT - (integer) - - - - - - - - - GEARMAN_CLIENT_NO_NEW - (integer) - - - - - - - - - GEARMAN_CLIENT_FREE_TASKS - (integer) - - - - - - - - - GEARMAN_CLIENT_STATE_IDLE - (integer) - - - - - - - - - GEARMAN_CLIENT_STATE_NEW - (integer) - - - - - - - - - GEARMAN_CLIENT_STATE_SUBMIT - (integer) - - - - - - - - - GEARMAN_CLIENT_STATE_PACKET - (integer) - - - - - - - - - GEARMAN_WORKER_ALLOCATED - (integer) - - - - - - - - - GEARMAN_WORKER_NON_BLOCKING - (integer) - - - - - - - - - GEARMAN_WORKER_PACKET_INIT - (integer) - - - - - - - - - GEARMAN_WORKER_GRAB_JOB_IN_USE - (integer) - - - - - - - - - GEARMAN_WORKER_PRE_SLEEP_IN_USE - (integer) - - - - - - - - - GEARMAN_WORKER_WORK_JOB_IN_USE - (integer) - - - - - - - - - GEARMAN_WORKER_CHANGE - (integer) - - - - - - - - - GEARMAN_WORKER_GRAB_UNIQ - (integer) - - - - - - - - - GEARMAN_WORKER_STATE_START - (integer) - - - - - - - - - GEARMAN_WORKER_STATE_FUNCTION_SEND - (integer) - - - - - - - - - GEARMAN_WORKER_STATE_CONNECT - (integer) - - - - - - - - - GEARMAN_WORKER_STATE_GRAB_JOB_SEND - (integer) - - - - - - - - - GEARMAN_WORKER_STATE_GRAB_JOB_RECV - (integer) - - - - - - - - - GEARMAN_WORKER_STATE_PRE_SLEEP - (integer) - - - - - - - - - GEARMAN_WORKER_FUNCTION_PACKET_IN_USE - (integer) - - - - - - - - - GEARMAN_WORKER_FUNCTION_CHANGE - (integer) - - - - - - - - - GEARMAN_WORKER_FUNCTION_REMOVE - (integer) - - - - - - - - - GEARMAN_WORKER_WORK_STATE_GRAB_JOB - (integer) - - - - - - - - - GEARMAN_WORKER_WORK_STATE_FUNCTION - (integer) - - - - - - - - - GEARMAN_WORKER_WORK_STATE_COMPLETE - (integer) - - - - - - - - - GEARMAN_WORKER_WORK_STATE_FAIL - (integer) - - - - - - - - - GEARMAN_SERVER_ALLOCATED - (integer) - - - - - - - - - GEARMAN_SERVER_PROC_THREAD - (integer) - - - - - - - - - GEARMAN_SERVER_QUEUE_REPLAY - (integer) - - - - - - - - - GEARMAN_SERVER_THREAD_ALLOCATED - (integer) - - - - - - - - - GEARMAN_SERVER_CON_SLEEPING - (integer) - - - - - - - - - GEARMAN_SERVER_CON_EXCEPTIONS - (integer) - - - - - - - - - GEARMAN_SERVER_CON_DEAD - (integer) - - - - - - - - - GEARMAN_SERVER_FUNCTION_ALLOCATED - (integer) - - - - - - - - - GEARMAN_SERVER_CLIENT_ALLOCATED - (integer) - - - - - - - - - GEARMAN_SERVER_WORKER_ALLOCATED - (integer) - - - - - - - - - GEARMAN_SERVER_JOB_ALLOCATED - (integer) - - - - - - - - - GEARMAN_SERVER_JOB_QUEUED - (integer) - - - - - - - - - GEARMAN_SERVER_JOB_IGNORE - (integer) - - - - - - - - - GEARMAND_LISTEN_EVENT - (integer) - - - - - - - - - GEARMAND_WAKEUP_EVENT - (integer) - - - - - - - - - GEARMAND_WAKEUP_PAUSE - (integer) - - - - - - - - - GEARMAND_WAKEUP_SHUTDOWN - (integer) - - - - - - - - - GEARMAND_WAKEUP_SHUTDOWN_GRACEFUL - (integer) - - - - - - - - - GEARMAND_WAKEUP_CON - (integer) - - - - - - - - - GEARMAND_WAKEUP_RUN - (integer) - - - - - - - - - GEARMAND_THREAD_WAKEUP_EVENT - (integer) - - - - - - - - - GEARMAND_THREAD_LOCK - (integer) - - - - - -