1
.TH "GEARMAN_RETURN_T" "3" "September 14, 2012" "0.38" "Gearmand"
3
gearman_return_t \- Gearmand Documentation, http://gearman.info/
5
.nr rst2man-indent-level 0
9
level \\n[rst2man-indent-level]
10
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
17
.\" .rstReportMargin pre:
19
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20
. nr rst2man-indent-level +1
21
.\" .rstReportMargin post:
25
.\" indent \\n[an-margin]
26
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27
.nr rst2man-indent-level -1
28
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
31
.\" Man page generated from reStructeredText.
35
#include <libgearman/gearman.h>
42
.B const char *gearman_strerror(\fI\%gearman_return_t\fP\fI\ rc\fP)
46
.B bool gearman_success(\fI\%gearman_return_t\fP\fI\ rc\fP)
50
.B bool gearman_failed(\fI\%gearman_return_t\fP\fI\ rc\fP)
54
.B bool gearman_continue(\fI\%gearman_return_t\fP\fI\ rc\fP)
57
Compile and link with \-lgearman
60
\fI\%gearman_return_t\fP is used as a return/error type for all calls using \fBgearman_client_st\fP and \fBgearman_worker_st\fP.
61
\fI\%GEARMAN_SUCCESS\fP is returned upon success, otherwise an error is returned. \fI\%gearman_failed()\fP can be used to see if the return value is a failing value.
62
You can print a text version of the error message with \fI\%gearman_strerror()\fP.
64
\fI\%gearman_success()\fP return true if \fI\%GEARMAN_SUCCESS\fP or if
65
\fI\%GEARMAN_NO_PENDING_TASKS\fP tests true.
67
\fI\%gearman_failed()\fP return true if any value other then \fI\%GEARMAN_SUCCESS\fP was provided.
69
\fI\%gearman_continue()\fP returns true if any error related to non\-blocking IO
70
occurred. This should be used for testing loops.
71
.SS Possible values of \fI\%gearman_return_t\fP:
79
.B GEARMAN_NO_PENDING_TASKS
80
\fBgearman_client_run_tasks()\fP was called and it has completed all tasks assigned to the client.
85
Blocking IO was found. gearman_continue() can be used to test for this.
90
System error occurred. Use either \fBgearman_client_errno()\fP or \fBgearman_worker_errno()\fP
94
.B GEARMAN_NO_ACTIVE_FDS
95
No active connections were available. gearman_continue() can be used to test for this.
99
.B GEARMAN_GETADDRINFO
100
Name resolution failed for a host.
104
.B GEARMAN_NO_SERVERS
105
No servers have been provided for the client/worker.
109
.B GEARMAN_LOST_CONNECTION
110
Connection was lost to the given server.
114
.B GEARMAN_MEMORY_ALLOCATION_FAILURE
115
Memory allocation failed.
119
.B GEARMAN_SERVER_ERROR
120
An error occurred on the server.
124
.B GEARMAN_NOT_CONNECTED
125
Client/Worker is not currently connected to the server.
129
.B GEARMAN_COULD_NOT_CONNECT
130
Server name was valid, but a connection could not be made.
134
.B GEARMAN_ECHO_DATA_CORRUPTION
135
Either \fBgearman_client_echo()\fP or \fBgearman_worker_echo()\fP echo
136
was unsuccessful because the data was returned from \fBgearmand\fP
141
.B GEARMAN_UNKNOWN_STATE
142
The gearman_return_t was never set.
146
.B GEARMAN_FLUSH_DATA
147
Internal state, should never be seen by either client or worker.
151
.B GEARMAN_SEND_BUFFER_TOO_SMALL
152
Send buffer was too small.
157
A timeout occurred when making a request to the server.
161
.B GEARMAN_ARGUMENT_TOO_LARGE
162
Argument was too large for the current buffer.
166
.B GEARMAN_INVALID_ARGUMENT
167
One of the arguments to the given API call was invalid. EINVAL will be set if \fBgearman_client_error()\fP or \fBgearman_worker_error()\fP were not settable. This can also be returned if \fBGEARMAN_CLIENT_UNBUFFERED_RESULT\fP was set, but the client is not handling the data correctly.
172
.B GEARMAN_NEED_WORKLOAD_FN
173
A client was asked for work, but no \fBgearman_workload_fn\fP callback was specified. See \fBgearman_client_set_workload_fn()\fP
178
A task has failed, and the worker has exited with an error or it called \fBgearman_job_send_fail()\fP
182
.B GEARMAN_IN_PROGRESS
183
\fBgearman_client_job_status()\fP has been called for a \fBgearman_job_handle_t\fP and the Job is currently being run by a worker.
187
.B GEARMAN_JOB_EXISTS
188
\fBgearman_client_job_status()\fP has been called for a \fBgearman_job_handle_t\fP and the Job is currently known by a server, but is not being run by a worker.
193
.B GEARMAN_INVALID_FUNCTION_NAME
194
A worker was sent a request for a job that it did not have a valid function for.
198
.B GEARMAN_INVALID_WORKER_FUNCTION
199
No callback was provided by the worker for a given function.
203
.B GEARMAN_NO_REGISTERED_FUNCTION
204
A request for removing a given function from a worker was invalid since that function did not exist.
208
.B GEARMAN_NO_REGISTERED_FUNCTIONS
209
The worker has not registered any functions.
214
No jobs were found for the worker.
218
Client which have registed a custom \fBgearman_actions_t\fP may use these
219
value as return values to the calling client.
223
Worker has sent a chunked piece of data to the client via \fBgearman_job_send_data()\fP
227
.B GEARMAN_WORK_WARNING
228
Worker has issued a warning to the client via \fBgearman_job_send_warning()\fP
232
.B GEARMAN_WORK_STATUS
233
Status has been updated by the worker via \fBgearman_job_send_status()\fP
237
.B GEARMAN_WORK_EXCEPTION
238
Worker has sent an exception the client via \fBgearman_job_send_exception()\fP
243
A task has failed, and the worker has exited with an error or it called \fBgearman_job_send_fail()\fP
247
.B GEARMAN_WORK_ERROR
248
A task has had an error and will be retried.
253
Used only in custom application for client return based on \fI\%GEARMAN_WORK_DATA\fP, \fI\%GEARMAN_WORK_WARNING\fP, \fI\%GEARMAN_WORK_EXCEPTION\fP, \fI\%GEARMAN_WORK_FAIL\fP, or \fI\%GEARMAN_WORK_STATUS\fP. \fI\%gearman_continue()\fP can be used to check for this value.
257
Any function defined by \fBgearman_worker_define_function()\fP may, and can only, return the following \fI\%gearman_return_t\fP values.
261
The function successfully completed the job.
270
The function failed to complete the job. \fI\%GEARMAN_FATAL\fP is the deprecated name for \fI\%GEARMAN_FAIL\fP
275
A task has had an error and will be retried.
280
\fI\%GEARMAN_SHUTDOWN\fP is a special case. If it is returned the client will be sent \fI\%GEARMAN_SUCCESS\fP, but \fBgearman_worker_work()\fP will exit with \fI\%GEARMAN_SHUTDOWN\fP.
285
.B GEARMAN_NOT_FLUSHING
286
\fBgearman_task_send_workload()\fP failed, it was not in the correct state.
290
.B GEARMAN_DATA_TOO_LARGE
291
\fBgearman_task_send_workload()\fP failed, the data was too large to be sent.
295
.B GEARMAN_UNKNOWN_OPTION
296
Default state of task return value.
300
If any of these errors occurred the connection will be dropped/reset.
303
.B GEARMAN_INVALID_MAGIC
307
.B GEARMAN_INVALID_COMMAND
311
.B GEARMAN_INVALID_PACKET
315
.B GEARMAN_UNEXPECTED_PACKET
319
.B GEARMAN_TOO_MANY_ARGS
324
.B GEARMAN_IGNORE_PACKET
328
.B GEARMAN_MAX_RETURN
332
\fIgearmand(8)\fP \fIlibgearman(3)\fP \fIgearman_client_error()\fP or \fIgearman_worker_error()\fP
334
Data Differential http://www.datadifferential.com/
336
2012, Data Differential, http://www.datadifferential.com/
337
.\" Generated by docutils manpage writer.