Download the PHP package phlib/beanstalk without Composer
On this page you can find all versions of the php package phlib/beanstalk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package beanstalk
phlib/beanstalk
Beanstalkd library implementation.
Install
Via Composer
Basic Usage
Connection configuration
Name | Type | Required | Default | Description |
---|---|---|---|---|
host |
String | Yes | Hostname or IP address. | |
port |
Integer | No | 11300 |
Beanstalk's port. |
options |
Array | No | <empty> |
Connection options for Beanstalk. |
Options
Name | Type | Default | Description |
---|---|---|---|
timeout |
Integer | 60 |
The connection timeout. |
Pool configuration
Name | Type | Required | Default | Description |
---|---|---|---|---|
connections |
ConnectionInterface[] | Yes | Array of server connections. | |
retryDelay |
Integer | No | 600 |
How long to delay retrying a connection for after an error. |
logger |
LoggerInterface | No | Optional Logger to capture connection failures. |
Factory
The factory allows for easy setup of the objects. This especially useful when creating a pool of beanstalk servers. The following example lists the various ways it can be used. The configuration examples in the command line section are created using the factory.
Factory Configuration
The configuration options are as specified above.
With the exception that when creating a pool there is an optional enabled
.
Pool
The pool allows for work to be pushed to and retrieved from multiple servers. The pool implements the connection interface.
Alternative way to create a Pool, using the Factory to construct the connections:
Command Line Script
Running the script will provide you with a list of options. Most are self-explanatory. By default no configuration is required, the script will default to localhost.
Command Line Configuration
There are 2 ways of specifying a configuration.
- Create a file called beanstalk-config.php either in or .
- Create a file with a name of your choosing and specify it using the command option .
The file must return an array containing the beanstalk configuration. This configuration will be passed to the Factory to create an instance.
License
This package is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.
All versions of beanstalk with dependencies
phlib/console-configuration Version ^2
psr/log Version ^1 || ^2 || ^3
symfony/console Version ^5.4 || ^6