Skip to content

simonbowen/Kostalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kostalk

A Kohana 3.2 module to make it easy to use beanstalkd, it uses Pheanstalk, a comprehensive lib already written in PHP

Install Beanstalk

sudo apt-get install beanstalkd
./beanstalkd

Some Code

// Add something to a queue
$queue = Kostalk::instance('name_of_tube');
$queue->push(array(
	'this' => 'is',
	'some' => 'data',
));
	
// Pull something from the queue, first callback param
// is the data in the job, the class uses JSON to encode
// and decode the data, this is all done for you. The second
// param is the job object from Pheanstalk

$queue = Kostalk::instance('name_of_tube')->pull(function($data, $job){
	print_r($data); // array('this' => 'is', 'some' => 'data');
});

About

Kohana 3.2 Module for beanstalk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages