1 : <?php
2 : /**
3 : * Ibuildings Gearman Magento Model Observer
4 : *
5 : * @copyright (c) 2010 Ibuildings UK Ltd.
6 : * @author Michael Davey
7 : * @version 0.1.0
8 : * @package Ibuildings
9 : * @subpackage Gearman
10 : * @license https://github.com/ibuildings/Magento-Gearman-Module/blob/master/LICENCE
11 : */
12 : class Ibuildings_Gearman_Model_Observer
13 1 : {
14 : /**
15 : * Send the job to the model
16 : *
17 : * Takes the event and sends it through to the model object
18 : * for processing
19 : * <code>
20 : * Made::DispatchEvent('gearman_do_async_task');
21 : * </code>
22 : *
23 : * @param array $event Array containing the 'queue' name and the job 'workload'
24 : */
25 : public function dispatchTask($event)
26 : {
27 1 : $queue = Mage::getModel('Ibuildings_Gearman_Model_Queue');
28 1 : $queue->dispatchTask($event);
29 1 : }
|