mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 06:18:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@335959 c90b9560-bf6c-de11-be94-00142212c4b1
591 lines
16 KiB
XML
591 lines
16 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<appendix xml:id="gearman.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
&reftitle.constants;
|
|
&extension.constants;
|
|
<para>
|
|
Return values. Always check <methodname>GearmanClient::error</methodname> or
|
|
<methodname>GearmanWorker</methodname> for a string error, as it may contain
|
|
more details:
|
|
</para>
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="constant.gearman-success">
|
|
<term>
|
|
<constant>GEARMAN_SUCCESS</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Whatever action was taken was successful.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-io-wait">
|
|
<term>
|
|
<constant>GEARMAN_IO_WAIT</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
When in non-blocking mode, an event is hit that would have blocked.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-errno">
|
|
<term>
|
|
<constant>GEARMAN_ERRNO</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
A system error. Check <methodname>GearmanClient::errno</methodname> or
|
|
<methodname>GearmanWorker::errno</methodname> for the system error code that
|
|
was returned.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-no-active-fds">
|
|
<term>
|
|
<constant>GEARMAN_NO_ACTIVE_FDS</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
<methodname>GearmanClient::wait</methodname> or <methodname>GearmanWorker</methodname> was
|
|
called with no connections.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-unexpected-packet">
|
|
<term>
|
|
<constant>GEARMAN_UNEXPECTED_PACKET</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Indicates something going very wrong in gearmand. Applies only to
|
|
<classname>GearmanWorker</classname>.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-getaddrinfo">
|
|
<term>
|
|
<constant>GEARMAN_GETADDRINFO</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
DNS resolution failed (invalid host, port, etc).
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-no-servers">
|
|
<term>
|
|
<constant>GEARMAN_NO_SERVERS</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Did not call <methodname>GearmanClient::addServer</methodname> before submitting jobs
|
|
or tasks.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-lost-connection">
|
|
<term>
|
|
<constant>GEARMAN_LOST_CONNECTION</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Lost a connection during a request.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-memory-allocation-failure">
|
|
<term>
|
|
<constant>GEARMAN_MEMORY_ALLOCATION_FAILURE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Memory allocation failed (ran out of memory).
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-server-error">
|
|
<term>
|
|
<constant>GEARMAN_SERVER_ERROR</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Something went wrong in the Gearman server and it could not handle the
|
|
request gracefully.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-work-data">
|
|
<term>
|
|
<constant>GEARMAN_WORK_DATA</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Notice return code obtained with <methodname>GearmanClient::returnCode</methodname>
|
|
when using <methodname>GearmanClient::do</methodname>. Sent to update the client
|
|
with data from a running job. A worker uses this when it needs to send updates,
|
|
send partial results, or flush data during long running jobs.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-work-warning">
|
|
<term>
|
|
<constant>GEARMAN_WORK_WARNING</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Notice return code obtained with <methodname>GearmanClient::returnCode</methodname>
|
|
when using <methodname>GearmanClient::do</methodname>. Updates the client with
|
|
a warning. The behavior is just like <constant>GEARMAN_WORK_DATA</constant>, but
|
|
should be treated as a warning instead of normal response data.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-work-status">
|
|
<term>
|
|
<constant>GEARMAN_WORK_STATUS</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Notice return code obtained with <methodname>GearmanClient::returnCode</methodname>
|
|
when using <methodname>GearmanClient::do</methodname>. Sent to update the status
|
|
of a long running job. Use <methodname>GearmanClient::doStatus</methodname> to obtain
|
|
the percentage complete of the task.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-work-exception">
|
|
<term>
|
|
<constant>GEARMAN_WORK_EXCEPTION</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Notice return code obtained with <methodname>GearmanClient::returnCode</methodname>
|
|
when using <methodname>GearmanClient::do</methodname>. Indicates that a job failed
|
|
with a given exception.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-work-fail">
|
|
<term>
|
|
<constant>GEARMAN_WORK_FAIL</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Notice return code obtained with <methodname>GearmanClient::returnCode</methodname>
|
|
when using <methodname>GearmanClient::do</methodname>. Indicates that the job failed.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-could-not-connect">
|
|
<term>
|
|
<constant>GEARMAN_COULD_NOT_CONNECT</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Failed to connect to servers.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-invalid-function-name">
|
|
<term>
|
|
<constant>GEARMAN_INVALID_FUNCTION_NAME</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Trying to register a function name of NULL or using the callback interface
|
|
without specifying callbacks.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-invalid-worker-function">
|
|
<term>
|
|
<constant>GEARMAN_INVALID_WORKER_FUNCTION</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Trying to register a function with a NULL callback function.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-no-registered-functions">
|
|
<term>
|
|
<constant>GEARMAN_NO_REGISTERED_FUNCTIONS</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
When a worker gets a job for a function it did not register.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-no-jobs">
|
|
<term>
|
|
<constant>GEARMAN_NO_JOBS</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
For a non-blocking worker, when <methodname>GearmanWorker::work</methodname> does not have
|
|
any active jobs.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-echo-data-corruption">
|
|
<term>
|
|
<constant>GEARMAN_ECHO_DATA_CORRUPTION</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
After <methodname>GearmanClient::echo</methodname> or <methodname>GearmanWorker::echo</methodname>
|
|
the data returned doesn't match the data sent.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-need-workload-fn">
|
|
<term>
|
|
<constant>GEARMAN_NEED_WORKLOAD_FN</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
When the client opted to stream the workload of a task, but did not
|
|
specify a workload callback function.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-pause">
|
|
<term>
|
|
<constant>GEARMAN_PAUSE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
For the non-blocking client task interface, can be returned from the task callback
|
|
to "pause" the call and return from <methodname>GearmanClient::runTasks</methodname>.
|
|
Call <methodname>GearmanClient::runTasks</methodname> again to continue.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-unknown-state">
|
|
<term>
|
|
<constant>GEARMAN_UNKNOWN_STATE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Internal client/worker state error.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-send-buffer-too-small">
|
|
<term>
|
|
<constant>GEARMAN_SEND_BUFFER_TOO_SMALL</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Internal error: trying to flush more data in one atomic chunk than is possible
|
|
due to hard-coded buffer sizes.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-timeout">
|
|
<term>
|
|
<constant>GEARMAN_TIMEOUT</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Hit the timeout limit set by the client/worker.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
|
|
<para>
|
|
<classname>GearmanClient</classname> options:
|
|
</para>
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="constant.gearman-client-generate-unique">
|
|
<term>
|
|
<constant>GEARMAN_CLIENT_GENERATE_UNIQUE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Generate a unique id (UUID) for each task.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-client-non-blocking">
|
|
<term>
|
|
<constant>GEARMAN_CLIENT_NON_BLOCKING</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Run the cient in a non-blocking mode.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-client-unbuffered-result">
|
|
<term>
|
|
<constant>GEARMAN_CLIENT_UNBUFFERED_RESULT</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Allow the client to read data in chunks rather than have the library
|
|
buffer the entire data result and pass that back.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-client-free-tasks">
|
|
<term>
|
|
<constant>GEARMAN_CLIENT_FREE_TASKS</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Automatically free task objects once they are complete. This is the default
|
|
setting in this extension to prevent memory leaks.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
|
|
<para>
|
|
<classname>GearmanWorker</classname> options:
|
|
</para>
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="constant.gearman-worker-non-blocking">
|
|
<term>
|
|
<constant>GEARMAN_WORKER_NON_BLOCKING</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Run the worker in non-blocking mode.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-worker-grab-uniq">
|
|
<term>
|
|
<constant>GEARMAN_WORKER_GRAB_UNIQ</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Return the client assigned unique ID in addition to the job handle.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
|
|
<para>
|
|
Base Gearman configuration:
|
|
</para>
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="constant.gearman-default-tcp-host">
|
|
<term>
|
|
<constant>GEARMAN_DEFAULT_TCP_HOST</constant>
|
|
(<type>string</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-default-tcp-port">
|
|
<term>
|
|
<constant>GEARMAN_DEFAULT_TCP_PORT</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-default-socket-timeout">
|
|
<term>
|
|
<constant>GEARMAN_DEFAULT_SOCKET_TIMEOUT</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-default-socket-send-size">
|
|
<term>
|
|
<constant>GEARMAN_DEFAULT_SOCKET_SEND_SIZE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-default-socket-recv-size">
|
|
<term>
|
|
<constant>GEARMAN_DEFAULT_SOCKET_RECV_SIZE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-max-error-size">
|
|
<term>
|
|
<constant>GEARMAN_MAX_ERROR_SIZE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-packet-header-size">
|
|
<term>
|
|
<constant>GEARMAN_PACKET_HEADER_SIZE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-job-handle-size">
|
|
<term>
|
|
<constant>GEARMAN_JOB_HANDLE_SIZE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-option-size">
|
|
<term>
|
|
<constant>GEARMAN_OPTION_SIZE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-unique-size">
|
|
<term>
|
|
<constant>GEARMAN_UNIQUE_SIZE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-max-command-args">
|
|
<term>
|
|
<constant>GEARMAN_MAX_COMMAND_ARGS</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-args-buffer-size">
|
|
<term>
|
|
<constant>GEARMAN_ARGS_BUFFER_SIZE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-send-buffer-size">
|
|
<term>
|
|
<constant>GEARMAN_SEND_BUFFER_SIZE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-recv-buffer-size">
|
|
<term>
|
|
<constant>GEARMAN_RECV_BUFFER_SIZE</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="constant.gearman-worker-wait-timeout">
|
|
<term>
|
|
<constant>GEARMAN_WORKER_WAIT_TIMEOUT</constant>
|
|
(<type>integer</type>)
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</appendix>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|
|
|