Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 953 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 953 Bytes

beanstalk

Build Status CoverageStatus License

amphp/beanstalk is an asynchronous Beanstalk client for PHP based on Amp.

Installation

composer require amphp/beanstalk

Usage

$beanstalk = new Amp\Beanstalk\BeanstalkClient("tcp://127.0.0.1:11300?tube=foobar");

$payload = json_encode([
    "job" => bin2hex(random_bytes(16)),
    "type" => "compress-image"
    "path" => "/path/to/image.png"
]);

$jobId = yield $beanstalk->put($payload);

More documentation

More documentation can be found on amphp.org/beanstalk.