1GEARMAN_TASK_SEND_WORKLOAD(3)      Gearmand      GEARMAN_TASK_SEND_WORKLOAD(3)
2
3
4

NAME

6       gearman_task_send_workload   -   Gearmand  Documentation,  http://gear
7       man.info/
8

SYNOPSIS

10       #include <libgearman/gearman.h>
11
12       gearman_task_st
13
14       void gearman_task_free(gearman_task_st *task)
15
16       void *gearman_task_context(const gearman_task_st *task)
17
18       void gearman_task_set_context(gearman_task_st *task, void *context)
19
20       const char *gearman_task_function_name(const gearman_task_st *task)
21
22       const char *gearman_task_unique(const gearman_task_st *task)
23
24       const char *gearman_task_job_handle(const gearman_task_st *task)
25
26       bool gearman_task_is_known(const gearman_task_st *task)
27
28       bool gearman_task_is_running(const gearman_task_st *task)
29
30       uint32_t gearman_task_numerator(const gearman_task_st *task)
31
32       uint32_t gearman_task_denominator(const gearman_task_st *task)
33
34       void      gearman_task_give_workload(gearman_task_st *task,       const
35       void *workload, size_t workload_size)
36
37       size_t      gearman_task_send_workload(gearman_task_st *task,     const
38       void *workload, size_t workload_size, gearman_return_t *ret_ptr)
39
40       const void *gearman_task_data(const gearman_task_st *task)
41
42       size_t gearman_task_data_size(const gearman_task_st *task)
43
44       void *gearman_task_take_data(gearman_task_st *task, size_t *data_size)
45
46       size_t    gearman_task_recv_data(gearman_task_st *task,     void *data,
47       size_t data_size, gearman_return_t *ret_ptr)
48
49       const char *gearman_task_error(const gearman_task_st *task)
50
51       New in version 0.21.
52
53
54       gearman_return_t gearman_task_return(const gearman_task_st *task)
55
56       New in version 0.21.
57
58
59       Link with -lgearman
60

DESCRIPTION

62       A  gearman_task_st represents a task.  Work that is sent by a client to
63       a gearman server is seen as a task (a worker receives  a  task  in  the
64       form of a job.
65
66       Tasks,  i.e. gearman_task_st are created by calling either gearman_exe‐
67       cute(),  gearman_client_add_task(),  or   gearman_client_add_task_back‐
68       ground().
69
70       gearman_client_add_task_status() can also create gearman_task_st, these
71       tasks will be used to monitor a previously created gearman_task_st.
72
73       gearman_task_free() is used to free a task. This only needs to be  done
74       if  a  task was created with a preallocated structure or if you want to
75       clean up the memory of a specific task.
76
77       gearman_task_set_context()   sets   the   given    context    of    the
78       gearman_task_st.  The  context  can  be  used  to pass information to a
79       gearman_task_st.
80
81       gearman_task_context() returns the context that was used  in  the  cre‐
82       ation    of    the    gearman_task_st    (or    that   was   set   with
83       gearman_task_set_context().
84
85       gearman_task_data() returns the current data that has been returned  to
86       the task. gearman_task_data_size() will give you the size of the value.
87       gearman_task_take_data() is the same  as  gearman_task_data()  but  the
88       value  that  is  returned  must  be  freed  by  the  client  (free(3)).
89       gearman_task_recv_data() can be used with pre-allocated buffers.
90
91       gearman_task_is_known(),                     gearman_task_is_running(),
92       gearman_task_numerator(), and gearman_task_denominator(), return values
93       related to the last status update that was made to the gearman_task_st.
94       They do not cause the gearman_task_st to update itself.
95
96       gearman_task_error()   return   the   last   error   message  that  the
97       gearman_task_st  encountered.  gearman_task_return()  return  the  last
98       gearman_return_t  stored.  A  value of GEARMAN_UNKNOWN_STATE means that
99       the task has not been submitted to server yet, or that no function  was
100       available if the job has been submitted.
101

RETURN VALUE

103       Various. Values that are returned by gearman_task_take_data() must have
104       free(3) called on them.
105

HOME

107       To find out more information please check: http://gearman.info/
108

SEE ALSO

110       gearmand(8) libgearman(3)
111

AUTHOR

113       Data Differential http://www.datadifferential.com/
114
116       2011-2014, Data Differential, http://www.datadifferential.com/
117
118
119
120
1211.1.19.1                         Feb 18, 2020    GEARMAN_TASK_SEND_WORKLOAD(3)
Impressum