Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pheanstalk for Laravel

Simple wrapper for Pheanstalk. Added static and dynamic loading.

Installation

Copy the config file to application/config/pheanstalk.php and update with your connection information

Usage

<?php

// ----------------------------------------
// producer (queues jobs)

// You can change the connection by changing the first parameter `Pheanstalk::connection('beanstalk1')`, connecitons are handled in the config
Pheanstalk::connection()
  ->useTube('testtube')
  ->put("job payload goes here\n");

// Or dynamically load the default connection
Pheanstalk::useTube('testtube')->put("job payload goes here\n");

// ----------------------------------------
// worker (performs jobs)

$pheanstalk = Pheanstalk::connection();

$job = $pheanstalk
  ->watch('testtube')
  ->ignore('default')
  ->reserve();

echo $job->getData();

$pheanstalk->delete($job);

?>

About

Pheanstalk Laravel Bundle

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages