1Gearman::Objects(3) User Contributed Perl Documentation Gearman::Objects(3)
2
3
4
6 Gearman::Objects - a parent class for Gearman::Client and
7 Gearman::Worker
8
10 job_servers([$job_servers])
11 Initialize the list of job servers. $job_serversshould be array or
12 array reference of hash references or stringified job servers. If the
13 port number is not provided, 4730 is used as the default. For example:
14
15 C<< $client->job_servers('127.0.0.1', { host => "192.168.1.100", port => 4730 }); >>
16
17 return "[job_servers]"
18
19 set_job_servers($js)
20 set job_servers attribute by canonicalized $js
21
22 canonicalize_job_servers($js)
23 $js a string, hash reference or array reference of aforementioned.
24
25 Hash reference should contain at least host key.
26
27 All keys: host, port (4730 on default), use_ssl, ca_file, cert_file,
28 key_file, socket_cb
29
30 return [canonicalized list]
31
32 func($func)
33 return "join $prefix_separator, $prefix, $func"
34
35 prefix([$prefix])
36 get/set the namespace / prefix for the function names.
37
38 prefix_separator([$separator])
39 getter/setter
40
41 default: "\t"
42
43 If gearmand uses memcached persistent queue type, override default
44 separator to insure jobs recovery
45
46 socket($js, [$timeout])
47 depends on "use_ssl" prepare IO::Socket::IP or IO::Socket::SSL
48
49 · $host_port peer address
50
51 · $timeout default: 1
52
53 return depends on "use_ssl" IO::Socket::(IP|SSL) on success
54
55 sock_nodelay($sock)
56 set TCP_NODELAY on $sock, die on failure
57
58
59
60perl v5.32.0 2020-07-28 Gearman::Objects(3)