Tag: worker

Fresque is a command line tool to manage your php-resque workers Fresque removes all the hassles of manipulating process, pipe, daemon and other cli-guru related commands when managing php resque workers. Instead of starting a worker with this command: QUEUE=notification php resque.php You use: fresque start –queue notification You begin to see its real usefulness […]

Using background jobs inside a php framework with php-resque is a little bit different, as the framework is imposing its own convention. Let’s see how to create background jobs in CakePHP, with the CakeResque plugin. CakeResque is a CakePHP plugin for creating background jobs that can be processed offline later. CakeResque is more than a […]

Now that you have some workers running, let’s feed them some jobs. In this part, we’ll try to understand what’s a job, and how to refactor your application to implement background jobs. What’s a job A job is a written order to tell the workers to execute a particular task. This order looks like: Mail, […]

This guide is intended for Linux and OS X users. Windows users will have to adapt some code to make them works. Understanding the internal works Technically, a worker is a PHP process that will run indefinitely, always monitoring for new jobs to execute. Pseudo-code of a worker’s internal: while (true) { $jobs = pullData(); […]

Background jobs are jobs that are executed outside the main flow of your program, and usually handled by a queue system. This first tutorial of the serie will introduce what’s a background job and its importance. Part 1 : Introduction Part 2 : Queue system Part 3 : Installation Part 4 : Worker Part 5 […]