~fractalcat/gearmand/docfixes

« back to all changes in this revision

Viewing changes to docs/man/gearman_client_do_high_background.3

  • Committer: Brian Aker
  • Date: 2012-09-30 23:55:03 UTC
  • mto: (621.4.21 workspace)
  • mto: This revision was merged to the branch mainline in revision 656.
  • Revision ID: brian@tangent.org-20120930235503-u6r0uq1hl0mdj5an
Fix it so that we don't need to store the manpages in the tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "GEARMAN_CLIENT_DO_HIGH_BACKGROUND" "3" "September 14, 2012" "0.38" "Gearmand"
2
 
.SH NAME
3
 
gearman_client_do_high_background \- Gearmand Documentation, http://gearman.info/
4
 
.
5
 
.nr rst2man-indent-level 0
6
 
.
7
 
.de1 rstReportMargin
8
 
\\$1 \\n[an-margin]
9
 
level \\n[rst2man-indent-level]
10
 
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11
 
-
12
 
\\n[rst2man-indent0]
13
 
\\n[rst2man-indent1]
14
 
\\n[rst2man-indent2]
15
 
..
16
 
.de1 INDENT
17
 
.\" .rstReportMargin pre:
18
 
. RS \\$1
19
 
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20
 
. nr rst2man-indent-level +1
21
 
.\" .rstReportMargin post:
22
 
..
23
 
.de UNINDENT
24
 
. RE
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
30
 
..
31
 
.\" Man page generated from reStructeredText.
32
 
.
33
 
.SH SYNOPSIS
34
 
.sp
35
 
#include <libgearman/gearman.h>
36
 
.INDENT 0.0
37
 
.TP
38
 
.B gearman_priority_t
39
 
.UNINDENT
40
 
.INDENT 0.0
41
 
.TP
42
 
.B gearman_return_t gearman_client_do_background(gearman_client_st\fI\ *client\fP, const char\fI\ *function_name\fP, const char\fI\ *unique\fP, const void\fI\ *workload\fP, size_t\fI\ workload_size\fP, char\fI\ *job_handle\fP)
43
 
.UNINDENT
44
 
.sp
45
 
Changed in version 0.21: \fBGEARMAN_PAUSE\fP will no longer be returned. A do operation will now run until it has been submitted.
46
 
.INDENT 0.0
47
 
.TP
48
 
.B gearman_return_t gearman_client_do_high_background(gearman_client_st\fI\ *client\fP, const char\fI\ *function_name\fP, const char\fI\ *unique\fP, const void\fI\ *workload\fP, size_t\fI\ workload_size\fP, gearman_job_handle_t\fI\ job_handle\fP)
49
 
.UNINDENT
50
 
.INDENT 0.0
51
 
.TP
52
 
.B gearman_return_t gearman_client_do_low_background(gearman_client_st\fI\ *client\fP, const char\fI\ *function_name\fP, const char\fI\ *unique\fP, const void\fI\ *workload\fP, size_t\fI\ workload_size\fP, gearman_job_handle_t\fI\ job_handle\fP)
53
 
.UNINDENT
54
 
.SH DESCRIPTION
55
 
.sp
56
 
\fI\%gearman_client_do_background()\fP executes a single request to the
57
 
gearmand server and returns the status via \fBgearman_return_t\fP.
58
 
.sp
59
 
\fBgearman_client_add_task_high_background()\fP and \fBgearman_client_add_task_low_background()\fP are identical to
60
 
\fI\%gearman_client_do_background()\fP, only they set the \fI\%gearman_priority_t\fP to either high or low.
61
 
.sp
62
 
If job_handle is not NULL, it will be populated with the name of the job_handle
63
 
for the task created. The job handle needs to be the size of
64
 
\fBGEARMAN_JOB_HANDLE_SIZE\fP. Please see \fBgearman_job_handle_t\fP for more information.
65
 
.SH RETURN VALUE
66
 
.sp
67
 
\fBgearman_return_t\fP
68
 
.SH EXAMPLE
69
 
.sp
70
 
.nf
71
 
.ft C
72
 
/*
73
 
# Gearman server and library
74
 
# Copyright (C) 2012 Data Differential, http://datadifferential.com/
75
 
# All rights reserved.
76
 
#
77
 
# Use and distribution licensed under the BSD license.  See
78
 
# the COPYING file in this directory for full text.
79
 
*/
80
 
 
81
 
#include <string.h>
82
 
#include <stdlib.h>
83
 
#include <stdio.h>
84
 
#include <libgearman\-1.0/gearman.h>
85
 
 
86
 
int main(void)
87
 
{
88
 
  gearman_client_st *client= gearman_client_create(NULL);
89
 
 
90
 
  gearman_return_t ret= gearman_client_add_server(client, "localhost", 0);
91
 
  if (gearman_failed(ret))
92
 
  {
93
 
    return EXIT_FAILURE;
94
 
  }
95
 
 
96
 
  gearman_job_handle_t job_handle;
97
 
  gearman_return_t rc= gearman_client_do_background(client,
98
 
                                                    "reverse_function",
99
 
                                                    "unique_value",
100
 
                                                    "my string to reverse", strlen("my string to reverse"),
101
 
                                                    job_handle);
102
 
 
103
 
  if (gearman_success(rc))
104
 
  {
105
 
    // Make use of value
106
 
    printf("%s\en", job_handle);
107
 
  }
108
 
 
109
 
  gearman_client_free(client);
110
 
 
111
 
  return 0;
112
 
}
113
 
 
114
 
.ft P
115
 
.fi
116
 
.SH HOME
117
 
.sp
118
 
To find out more information please check:
119
 
\fI\%http://gearman.info/\fP
120
 
.IP "See also"
121
 
.sp
122
 
\fIgearmand(8)\fP \fIlibgearman(3)\fP \fIgearman_strerror(3)\fP
123
 
.RE
124
 
.SH AUTHOR
125
 
Data Differential http://www.datadifferential.com/
126
 
.SH COPYRIGHT
127
 
2012, Data Differential, http://www.datadifferential.com/
128
 
.\" Generated by docutils manpage writer.
129
 
.\" 
130
 
.