1GEARMAN_CONTINUE(3) Gearmand GEARMAN_CONTINUE(3)
2
3
4
6 gearman_continue - Gearmand Documentation, http://gearman.info/
7
9 #include <libgearman/gearman.h>
10
11 gearman_return_t
12
13 const char *gearman_strerror(gearman_return_t rc)
14
15 bool gearman_success(gearman_return_t rc)
16
17 bool gearman_failed(gearman_return_t rc)
18
19 bool gearman_continue(gearman_return_t rc)
20
21 Compile and link with -lgearman
22
24 gearman_return_t is used as a return/error type for all calls using
25 gearman_client_st and gearman_worker_st. GEARMAN_SUCCESS is returned
26 upon success, otherwise an error is returned. gearman_failed() can be
27 used to see if the return value is a failing value. You can print a
28 text version of the error message with gearman_strerror().
29
30 gearman_success() return true if GEARMAN_SUCCESS or if
31 GEARMAN_NO_PENDING_TASKS tests true.
32
33 gearman_failed() return true if any value other then GEARMAN_SUCCESS
34 was provided.
35
36 gearman_continue() returns true if any error related to non-blocking IO
37 occurred. This should be used for testing loops.
38
39 Possible values of gearman_return_t:
40 GEARMAN_SUCCESS
41 Success
42
43 GEARMAN_NO_PENDING_TASKS
44 gearman_client_run_tasks() was called and it has completed all
45 tasks assigned to the client.
46
47 GEARMAN_IO_WAIT
48 Blocking IO was found. gearman_continue() can be used to test
49 for this.
50
51 GEARMAN_ERRNO
52 System error occurred. Use either gearman_client_errno() or
53 gearman_worker_errno()
54
55 GEARMAN_NO_ACTIVE_FDS
56 No active connections were available. gearman_continue() can be
57 used to test for this.
58
59 GEARMAN_GETADDRINFO
60 Name resolution failed for a host.
61
62 GEARMAN_NO_SERVERS
63 No servers have been provided for the client/worker.
64
65 GEARMAN_LOST_CONNECTION
66 Connection was lost to the given server.
67
68 GEARMAN_MEMORY_ALLOCATION_FAILURE
69 Memory allocation failed.
70
71 GEARMAN_SERVER_ERROR
72 An error occurred on the server.
73
74 GEARMAN_NOT_CONNECTED
75 Client/Worker is not currently connected to the server.
76
77 GEARMAN_COULD_NOT_CONNECT
78 Server name was valid, but a connection could not be made.
79
80 GEARMAN_ECHO_DATA_CORRUPTION
81 Either gearman_client_echo() or gearman_worker_echo() echo was
82 unsuccessful because the data was returned from gearmand cor‐
83 rupted.
84
85 GEARMAN_UNKNOWN_STATE
86 The gearman_return_t was never set.
87
88 GEARMAN_FLUSH_DATA
89 Internal state, should never be seen by either client or worker.
90
91 GEARMAN_SEND_BUFFER_TOO_SMALL
92 Send buffer was too small.
93
94 GEARMAN_TIMEOUT
95 A timeout occurred when making a request to the server.
96
97 GEARMAN_ARGUMENT_TOO_LARGE
98 Argument was too large for the current buffer.
99
100 GEARMAN_INVALID_ARGUMENT
101 One of the arguments to the given API call was invalid. EINVAL
102 will be set if gearman_client_error() or gearman_worker_error()
103 were not settable. This can also be returned if GEAR‐
104 MAN_CLIENT_UNBUFFERED_RESULT was set, but the client is not han‐
105 dling the data correctly.
106
107 CLIENT ONLY
108 GEARMAN_NEED_WORKLOAD_FN
109 A client was asked for work, but no gearman_workload_fn callback
110 was specified. See gearman_client_set_workload_fn()
111
112 GEARMAN_WORK_FAIL
113 A task has failed, and the worker has exited with an error or it
114 called gearman_job_send_fail()
115
116 GEARMAN_IN_PROGRESS
117 gearman_client_job_status() has been called for a gear‐
118 man_job_handle_t and the Job is currently being run by a worker.
119
120 GEARMAN_JOB_EXISTS
121 gearman_client_job_status() has been called for a gear‐
122 man_job_handle_t and the Job is currently known by a server, but
123 is not being run by a worker.
124
125 WORKER ONLY
126 GEARMAN_INVALID_FUNCTION_NAME
127 A worker was sent a request for a job that it did not have a
128 valid function for.
129
130 GEARMAN_INVALID_WORKER_FUNCTION
131 No callback was provided by the worker for a given function.
132
133 GEARMAN_NO_REGISTERED_FUNCTION
134 A request for removing a given function from a worker was
135 invalid since that function did not exist.
136
137 GEARMAN_NO_REGISTERED_FUNCTIONS
138 The worker has not registered any functions.
139
140 GEARMAN_NO_JOBS
141 No jobs were found for the worker. This error code is only
142 returned if the worker has just made a request for jobs.
143
144 WORKER TO CLIENT
145 Client which have registed a custom gearman_actions_t may use these
146 value as return values to the calling client.
147
148 GEARMAN_WORK_DATA
149 Worker has sent a chunked piece of data to the client via gear‐
150 man_job_send_data()
151
152 GEARMAN_WORK_WARNING
153 Worker has issued a warning to the client via gear‐
154 man_job_send_warning()
155
156 GEARMAN_WORK_STATUS
157 Status has been updated by the worker via gearman_job_send_sta‐
158 tus()
159
160 GEARMAN_WORK_EXCEPTION
161 Worker has sent an exception the client via gear‐
162 man_job_send_exception()
163
164 GEARMAN_WORK_FAIL
165 A task has failed, and the worker has exited with an error or it
166 called gearman_job_send_fail()
167
168 GEARMAN_WORK_ERROR
169 A task has had an error and will be retried.
170
171 GEARMAN_PAUSE
172 Used only in custom application for client return based on
173 GEARMAN_WORK_DATA, GEARMAN_WORK_WARNING, GEARMAN_WORK_EXCEPTION,
174 GEARMAN_WORK_FAIL, or GEARMAN_WORK_STATUS. gearman_continue()
175 can be used to check for this value.
176
177 WORKER TO CLIENT
178 Any function defined by gearman_worker_define_function() may, and can
179 only, return the following gearman_return_t values.
180
181 GEARMAN_SUCCESS
182 The function successfully completed the job.
183
184 GEARMAN_FATAL
185
186 GEARMAN_FAIL
187 The function failed to complete the job. GEARMAN_FATAL is the
188 deprecated name for GEARMAN_FAIL
189
190 GEARMAN_ERROR
191 A task has had an error and will be retried.
192
193 GEARMAN_SHUTDOWN
194 GEARMAN_SHUTDOWN is a special case. If it is returned the client
195 will be sent GEARMAN_SUCCESS, but gearman_worker_work() will
196 exit with GEARMAN_SHUTDOWN.
197
198 TASK ONLY
199 GEARMAN_NOT_FLUSHING
200 gearman_task_send_workload() failed, it was not in the correct
201 state.
202
203 GEARMAN_DATA_TOO_LARGE
204 gearman_task_send_workload() failed, the data was too large to
205 be sent.
206
207 GEARMAN_UNKNOWN_OPTION
208 Default state of task return value.
209
210 PROTOCOL
211 If any of these errors occurred the connection will be dropped/reset.
212
213 GEARMAN_INVALID_MAGIC
214
215 GEARMAN_INVALID_COMMAND
216
217 GEARMAN_INVALID_PACKET
218
219 GEARMAN_UNEXPECTED_PACKET
220
221 GEARMAN_TOO_MANY_ARGS
222
223 DEPRECATED
224 GEARMAN_IGNORE_PACKET
225
226 GEARMAN_MAX_RETURN
227
229 gearmand(8) libgearman(3) gearman_client_error() or gear‐
230 man_worker_error()
231
233 Data Differential http://www.datadifferential.com/
234
236 2011-2014, Data Differential, http://www.datadifferential.com/
237
238
239
240
2411.1.18 December 11, 2017 GEARMAN_CONTINUE(3)